Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Issue or Bug with Value

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. 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
Message2.
#13273
Posted by: Jeff Glatt 2010-03-22 13:25:24
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)
Message3.
#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 • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,290.00 ·
 
 
¥918.00 ·
 
 
¥890.00 ·
 
 
¥294.00 ·
 
 
¥430.00 ·
 
 
¥1,380.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0