[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Grouping Data
[Adam Dray describes a practical syntax expansion of MOVE and some other
stuff]
Adam,
That's a good idea... I think SQRIBE should implement this...
Another suggestion that may be handy... something like this...
Declare-Structure
name=$NArec
variable=$NAname:char
variable=$NAaddr:char
variable=$NAcity:char
variable=$NAstate:char
variable=$NAzip:char
End-Declare
then you can initialize the whole thing with something like...
let $NArec = ' '
OR
move ' ' to $NArec
or even
Clear-Structure Name=$NArec
Just a thought...
Tony DeLia
Maybe SQRIBE can implement your 'Fill Pattern' proposal by Valentine's
Day... if not you'll have to write your own 'XO' routine for the
$hugs_and_kisses variable...
Dray, Adam wrote:
>
> [Tony DeLia describes a COBOL-like enhancement that would be nice.]
>
> >In SQR I would have to initialize as follows...
> >
> >let $NAname = ' '
> >let $NAaddr = ' '
> >let $NAcity = ' '
> >let $NAstate = ' '
> >let $NAzip = ' '
>
> Why not extend the MOVE command thus:
> Move '' to $NAname, $NAaddr, $NAcity, $NAstate, $NAzip
>
> Yes, you still have to write out each variable, but I find it very
> readable.
>
> If you wanted to fill a set of variables with a character or
> pattern, a Write statement could be useful:
> Fill ' ' Into $NAname:15, $NAaddr:30, $NAcity:30, $NAstate:2, $NAzip:9
>
> Let $pattern = 'XO'
> Fill $pattern Into $hugs_and_kisses:6
> ! $pattern is now 'XOXOXO'
>
> While I'm at it, I'd like a pony. ;)
>
> Adam Dray
--
Tony DeLia
AnswerThink Consulting Group
PeopleSoft Solutions Practice - Delphi Partners
tdelia@erols.com
http://www.sqrtools.com