In article <hidden-3A4CA5.00553819072003 DeleteThis @news.stanford.edu>,
Hidden <hidden DeleteThis @no-op.com> wrote:
> In article
> <rhdennis-77D029.01214619072003 DeleteThis @newssvr30-ext.news.prodigy.com>,
> rhdennis <rhdennis DeleteThis @guess.sbcglobal.net> wrote:
>
> > Okay then, hope someone finds this as useful as I did. And I'll continue
> > exploring what things you can do with variables in the CL Macro language.
>
> Cool discovery. This confirms my theory -- the macro engine is simpler
> than we give it credit for. My take on the logic of the macro engine,
> for those interested in this type of thing:
>
Thanks for the feedback ... might be right, but since you can "set"
built in function you might have to mess with your evaluation list a
tad. For those who don't know, you can actually do things like:
set @text <value>
Then can call a function that is supposed to look at the input
box...fooling it into accepting YOUR data instead. This is VERY useful
for things like assigning your own macro calls that looks at the input
@text box to fkeys like so:
<fkey>
{
set @text ""
call NewRoutine
}
This call to your routine will ignore any text already in the client's
input box. It would be the same as making the NewRoutine call with no
argument.
Now, on a completely different sidenote. I mentioned a week or so ago I
was interested in 2D arrays and was hoping someone had worked with them
a bit. Only Phineas replied so I'm having to sort of invent the wheel
here and I have the following problems:
// this works just like you'd expect.
"/exptest0"
{
set var[0] "I"
set var[1] "wonder"
set var[2] "whether"
set var[3] "this"
set var[4] "works."
set num1 0
set num2 0
label init_loop
if num1 < 5
set array[num1][num2] var[num1]
set num1 + 1
set num2 + 1
goto init_loop
end if
set num1 0
set num2 0
set temp ""
label start_loop
if num1 < 5
set temp + array[num1][num2]
set temp + " "
set num1 + 1
set num2 + 1
goto start_loop
end if
message temp
}
// this does not work....
"/exptest1"
{
set array[0][0] "I"
set array[1][1] "wonder"
set array[2][2] "whether"
set array[3][3] "this"
set array[4][4] "works."
set num1 0
set num2 0
set temp ""
label start_loop
if num1 < 5
set temp + array[num1][num2]
set temp + " "
set num1 + 1
set num2 + 1
goto start_loop
end if
message temp
}
// but this one does! ??? ... why? Whats going on here?
"/exptest2"
{
set array[0][0] "I"
set array[0][1] "wonder"
set array[0][2] "whether"
set array[0][3] "this"
set array[0][4] "works."
set num2 0
set temp ""
label start_loop
if num2 < 5
set temp + array[0][num2]
set temp + " "
set num2 + 1
goto start_loop
end if
message temp
}
If someone out there has some insight, I'd appreciate it.
I've also tried things like:
set nArray[index] "0 0 0 0 0"
from here you can read each "cell" with the following:
set fVar nArray[index]
if fVar.word[N] <condition> <testcase>
I thought I should be able to do it directly like:
if nArray[index].word[N] <condition> <testcase>
// but it didn't work =\
I was able to read the "array". I wasn't able to figure out how to
change any of the "elements". (Can't do any calculations because the
elements are "strings" bleh).
rhdennis<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: CL: Undocumented Macro feature