Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 06 MAY 1999 11:43:32AM B. Cameron wrote:

Using OI 3.5 and have two tables… BOOKS & TITLES.

Books=Title Codes

Titles=Author Codes

In Dict for books there is a Symbolic named AUTHOR_CODES

@ANS=XLATE( "TITLES" , {TITLE_CODE} , 5 , X)

In Dict for books there is also a symbolic named AUTHOR_1

@ANS=XLATE( "TITLES" , {TITLE_CODE} , "AUTHOR_1" , "X" )

where Author_1 in the TITLES dict will grap the first value .

AUTHOR_CODES works unless Books/{TITLE_CODE} is null and I get bounced into the debugger…

ENG0010:RTP16 Line1 Variable has not been assigned a value.

BUT AUTHOR_1 works regardless. Maybe I am missing the obvious.

Any ideas?


At 07 MAY 1999 04:38AM Oystein Reigem wrote:

B,

@ANS=XLATE( "TITLES" , {TITLE_CODE} , 5 , X)

X must be "X".

It seems one gets the "Variable has not been assigned a value" message when the fourth parameter (the variable X in your case) is undefined, and at the same time the second parameter ({TITLE_CODE} in your case) is not a key (null in your case).

It seems the Xlate function doesn't check the fourth parameter unless it needs to use it, i.e, when the second parameter is not a key.

And when it does check the fourth parameter it seems every defined value else than "X" works as "C". So if you by chance had a variable X in you program, you would probably get the "C" behaviour, where Xlate returns the key when the key doesn't exist. In your case null. And no debugger.

Well, life's full of coincidences.

- Oystein -


At 07 MAY 1999 12:08PM BC wrote:

Oystein,

Ahhh, I knew that!

Yup it was the obvious. I actually copy and pasted those into notepad

and compared byte for byte and still missed the quotes.

Argh! But thanks for the obvious.

Bruce

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/ff54e9af8094fcd4852567690056623c.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1