Just for fun, an alternate method which never leaves trailing commas
and respects the itemDelimiter:
on AddItem @pVar, pItem
if (pVar is not empty) then put the itemDelimiter after pVar
put pItem after pVar
end AddItem
On Wed, 13 Jun 2007 16:23:24 -0400, Shari wrote:
But Shari, the last comma provides zero as the last item. Not very
useful and potentially hazardous, I agree.
Joe Wilkins
What bothers me is that almost any repeat loop that builds a variable
will have a trailing comma, so I would expect the engine to ignore
it, as was done in the past. (Key point - that in the past this was
handled differently.)
global myVariable
repeat x
put someNumber or someOtherThing & comma after myVariable
end repeat
I use this type of handler frequently. Whether it be numbers or
words doesn't matter. Yes, it can be worked around, by deleting the
trailing comma at some point.
Yes, I've gotten in the habit of deleting it immediately:
global myVariable
repeat x
put someNumber or someOtherThing & comma after myVariable
end repeat
delete char -1 of myVariable
In fact, I even have a separate handler to save me from having to type
"delete char -1 of <var>" all the time; it's called KLC (kill last
character):
on KLC @pWhat
delete char -1 of pWhat
end KLC
That way, I can do:
KLC myVariable
and immediately following this command, myVariable has been trimmed
appropriately.
Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution