[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

SQR Bug? - Variable names.




	I have another question.  I found the source of my problem with the
array.  It is not an array problem, it was a variable problem.  Maybe
I am naive in reguards to this, and would appreciate it if someone
could clear this up, or explain why.

My previous problem was the following

  get #pidm, $var2, ..........

Comma's aren't used in this statement, but no error was generated, and
no values returned, or so I though..... (ASSUMED!)

  show (+1,1) #pidm  

I get nothing.

  show (+1,1) #pidm,

I get the proper value.  I guess I never realized that the SQR compiler doesn't
care what the variable name is after the leading symbol.  I also can not find
in the manual (2.5) that I can have radical names for my variables, which in
my opinion is worth noting!


Here are a few VALID VARIABLE NAMES that will illustrate my point.

  #$pidm,1  - valid # var name

  #pidm,$deli_code - valid # var name

  #pidm, - valid # var name

I understand why this happens, there are no characters that are not allowed
in a variable name, and the space is the only delimeter.  This can frustrate
a programmer beyond belief (person experience).   If this fact was mentioned
in my original SQR training I have long since forgotten it, and find no
OBVIOUS refrence in the manual, to an OBVIOUS problem that can occur without
even realizing it.

Maybe I'm way out on a limb here, but I use SQL*Plus to develop my larger
selects before I integrate them into SQR.  I happen to sometimes use a 
COMMA in these statements.  When I go into SQR I accidentially use them
without thinking.