[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: VAriables on the command line.



Reply to note from Harry Binswanger  Sat, 02 Feb
2013 00:32:33 -0500

> By the way, I think I posted here the amazing fact that you can
> use a variable in , if you precede it by another @.
> Thus:
>
> 

Ah, so! Meaning that if S/G 01="red.white.blue" and S/G 02=3, then
 returns "blue", as shown here (DeFine and XYRUN it):

'%--_XYENCode_start--
~~~~>~~
'%--_XYENCode___end--

Which is nifty indeed! Nice find, Harry!

By the way, you can use my frame VA@ (or VN@) to do "column,row"
array parsing with either hard or variable x,y values. Both examples
below pluck out word 3 in row 2 ("mind"). In the first example, the
values 2 and 3 are hard-coded; in the second, they're in S/G 02 and
03, respectively. Note that the framename is flexible in that it
will accept CrLf as the separator; no can do with native VA@.
(Decode the examples to visualize the columnar array.)

'%--_XYENCode_start--
',*',_hard-coded_column,row'^~'JM2.VA@01'^2'Q2'JM2.
VA@50,3'Q2~~'^
'%--_XYENCode___end--

'%--_XYENCode_start--
',*',_variable_column,row'^~~~'JM
2.VA@01'^~'Q2'JM2.VA@50,~'Q2~~'^
'%--_XYENCode___end--

--
Carl Distefano
cld@xxxxxxxx