IonicWind Software

IWBasic => General Questions => Topic started by: CodeTRUCKER on January 09, 2008, 05:50:39 PM

Title: Numbers in Variable names in EBASIC?
Post by: CodeTRUCKER on January 09, 2008, 05:50:39 PM
I am getting a...

File: C:\Program Files\EBDev\projects\LogWatch.eba (120) syntax error - 11

when I try to use "11HrsLeft" as a variable.  What's going on?
Title: Re: Numbers in Variable names in EBASIC?
Post by: Ionic Wind Support Team on January 09, 2008, 06:12:43 PM
Users guide, variables can start with and underscore, or a letter.  They cannot begin with a number.
Title: Re: Numbers in Variable names in EBASIC?
Post by: mrainey on January 09, 2008, 06:25:55 PM
This is what's in my copy of the User Guide (I've installed v1.598).

"Variable names can be any identifier you choose as long as they do not conflict with any reserved word or constant."
Title: Re: Numbers in Variable names in EBASIC?
Post by: LarryMc on January 09, 2008, 07:20:48 PM
QuoteThis is what's in my copy of the User Guide (I've installed v1.598).
I also have the latest version installed

In the Language - Language Syntax Overview Section you'll find:
QuoteIdentifiers

An identifier is a term used to describe a token, variable name, function name, command, or statement. Identifiers can start with an underscore symbol or a letter. Identifiers can be a maximum of 64 characters in length. An identifier cannot begin with a numeric but can contain any number of alphanumeric symbols after the initial symbol.

Larry
Title: Re: Numbers in Variable names in EBASIC?
Post by: mrainey on January 09, 2008, 09:37:05 PM
Thanks Larry,

I didn't follow up on the definition of the word "Identifier".
Title: Re: Numbers in Variable names in EBASIC?
Post by: LarryMc on January 09, 2008, 10:27:47 PM
I wouldn't have either but there have been so many times I've said I can't find something and Paul tells me "it's in the help file" that I went looking and found it.

It took me a while to find it.

Like I said, Paul has done that to me numerous times. ;)

Larry