| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. Issue or Bug with Value #13272 Posted by: DougA 2010-03-22 06:34:11 | I'm trying to use VALUE to set some parms from a control file, but I'm having a problem.
StemName = "Doug" StemDot = "BirthDay"
NewValue = "20100321"
x = value(StemName.StemDot, NewValue)
NOVALUE raised: BirthDay Line #6, err66: BirthDay has no value
If I use this instead, (not using a stem), it works. (and x comes back as "DOUG" as expected)
x = value(StemName, NewValue)
"BirthDay" IS the value, it's not a variable.
Am I confused here, or is there a bug ?Doug | 2. #13273 | It's correct. First of all, StemDot (the tail part) gets substituted with its value "BirthDay". StemName doesn't get substituted because it's not a tail (but it does get upper-cased). So what you're passing to VALUE() is the variable name "DOUG.BirthDay". But remember that VALUE() is also looking at this like a variable name. It notices that "BirthDay" is a non-numeric tail name, so it also tries to perform a substitute. There's the error.
It will work if you do:x = VALUE(stemname || ".BIRTHDAY", newvalue) | 3. #13275 Posted by: DougA 2010-03-23 01:09:35 | ok, that's fine if 'birthday' is a fixed and known value, but it's not.
However, I must have been "over thinking" this one, for sure overworking it. Here's what i have ... A number of stems with dates for the tails that i wish to save and reload. TapeId.20100307 <value> Speaker.20100307 <value> Series.20100307 <value> TapId.20100314 <value> Speaker.20100314 <value> Series.20100314 <value> ...etc.
I could use SAVE/LOADTEXT, but wanted to use VALUE since not everything in the file will "LOAD"
I guess it was too simple. This works ...
StemId = "TapeId.20100307" StemValue = "5097"
x = VALUE(StemId, StemValue)
Thanks,Doug | Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|