1. variable names

Not a priority, i know, but.....

Any chance of getting less restrictive variable names? I just got tripped up on 

sequence 404file
a name is expected here

I know, everyone will say "so pick a name inside the Eu naming rules", but to be
zooming along coding, and get tripped up by something so trivial, breaking train
of thought, it's annoying beyond just typing a letter first, and the chosen name
"404file" is sure self explanitory and quite readable.

This has been brought up before, but if someone is in that area of Eu source and
has a spare minute or two, please reconsider it?

Kat

new topic     » topic index » view message » categorize

2. Re: variable names

Kat wrote:
> 
> 
> Not a priority, i know, but.....
> 
> Any chance of getting less restrictive variable names? I just got tripped up
> on 
> 
> sequence 404file
> a name is expected here
> 
> I know, everyone will say "so pick a name inside the Eu naming rules", but to
> be zooming along coding, and get tripped up by something so trivial, breaking
> train of thought, it's annoying beyond just typing a letter first, and the
> chosen
> name "404file" is sure self explanitory and quite readable.
> 
> This has been brought up before, but if someone is in that area of Eu source
> and has a spare minute or two, please reconsider it?
> 
> Kat

I don't know of any computer langauge that allows the use of

identifiers that start with a number ?


Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

3. Re: variable names

Bernie Ryan wrote:
> 
> I don't know of any computer langauge that allows the use of
> 
> identifiers that start with a number ?
> 
> 
> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

I think that Lisp and Forth do...

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

new topic     » goto parent     » topic index » view message » categorize

4. Re: variable names

Jason Gade wrote:
> 
> Bernie Ryan wrote:
> > 
> > I don't know of any computer langauge that allows the use of
> > 
> > identifiers that start with a number ?
> > 
> > 
> > Bernie
> > 
> > My files in archive:
> > WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> > 
> > Can be downloaded here:
> > <a
> > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>
> 
> I think that Lisp and Forth do...
In eForth there is: 2DUP, 2DROP, 0=, 2!, 2 at , ... and you can extend the
dictionary with your own definitions.

> 
> --
> A complex system that works is invariably found to have evolved from a simple
> system that works.
> --John Gall's 15th law of Systemantics.
> 
> "Premature optimization is the root of all evil in programming."
> --C.A.R. Hoare
> 
> j.
- Fernando

new topic     » goto parent     » topic index » view message » categorize

5. Re: variable names

Kat wrote:
> 
> 
> Not a priority, i know, but.....
> 
> Any chance of getting less restrictive variable names? I just got tripped up
> on 
> 
> sequence 404file
> a name is expected here
> 
> I know, everyone will say "so pick a name inside the Eu naming rules", but to
> be zooming along coding, and get tripped up by something so trivial, breaking
> train of thought, it's annoying beyond just typing a letter first, and the
> chosen
> name "404file" is sure self explanitory and quite readable.
> 
> This has been brought up before, but if someone is in that area of Eu source
> and has a spare minute or two, please reconsider it?
> 
> Kat

Hi Kat,

Someone said they didnt know any languages that allow a number as
first char of a var name, but my Scientific calculator does allow
that.
For example, in:
  12f=2
the var name "12f" is considered valid, and returns the value 2
when it's used later as would be expected.

One of the reasons for allowing this was to accomodate the times
when you want a variable declared such as:
  2pi=2*pi
so you dont have to keep typing "2*pi" every time you want 2pi
or declare it as "TwoPi" or whatever.
It sounds kinda strange, but it works out in the long run especially
since combinations of chars like that dont normally occur without
a multiplication sigh "*" in there.
The down side is that error correction is a little less enhanced,
because someone might make the mistake of typing "2pi" when they 
really meant "2*p" as in:
  p=123
  2p=456 --not equal to 2*p
  TP=2p  --do they want 2p or really want 2*p ???
If they make a mistake like this the error detection scheme wont
catch it but will silently assign 456 to TP rather than 246 to TP.

The working context is a little different here however, in that
when dealing with numbers like this people usually check over their
work anyway to make sure they didnt make a mistake in the calculations
where it would show up anyway.



Take care,
Al

E boa sorte com sua programacao Euphoria!


My bumper sticker: "I brake for LED's"

 From "Black Knight":
"I can live with losing the good fight,
 but i can not live without fighting it".
"Well on second thought, maybe not."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu