Anonymous user
Table creation/Postal addresses: Difference between revisions
m
→{{header|REXX}}: changed indentation, comments. -- ~~~~
m (→SQLite3) |
m (→{{header|REXX}}: changed indentation, comments. -- ~~~~) |
||
Line 523:
│ @USA.nnn._upHist = update History (who, date and timestamp). │
└────────────────────────────────────────────────────────────────────┘*/
@USA.=
@usa.0=@usa.0+1 /*bump the unique number for use.*/
Line 539:
call @USA '_name',"The White House"
call @USA '_zip',20500
call @USA 'list'
exit /*stick a fork in it, we're done.*/
/*───────────────────────────────@USA subroutine────────────────────────*/
@USA: procedure expose @USA.; parse arg what,txt; arg ?; nn=@usa.0
Line 548 ⟶ 547:
call value '@USA.'nn".upHist",userid() date() time()
end
else do nn=1 for @usa.0
call @USA_list
end /*nn*/
return
/*───────────────────────────────@USA_tell
@USA_tell: _=value('@USA.'nn"."arg(1));
if _\=='' then say right(translate(arg(1),,'_'),6) "
return
/*───────────────────────────────@USA_list
@USA_list: call @USA_tell '_name'
call @USA_tell '
do j=2 until _==''
call @USA_tell '_addr'▼
call @USA_tell '_addr'j▼
end /*j*/
▲ call @USA_tell '_addr'j
call @USA_tell '
call @USA_tell '
return</lang>▼
▲say copies('-',40)
▲return</lang>
▲Output (data used is within the REXX program):
▲<pre style="height:40ex;overflow:scroll">
▲ name ==> FSF Inc.
▲ addr ==> 51 Franklin Street
▲ city ==> Boston
▲ state ==> MA
────────────────────────────────────────
▲ zip ==> 02110-1301
name ──► The White House
▲ addr2 ==> 1600 Pennsylvania Avenue NW
▲ city ==> Washington
▲ state ==> DC
────────────────────────────────────────
▲ zip ==> 20500
</pre>
|