Re: Incorrect scoping of constants in IMCC

2003-12-10 Thread Dan Sugalski
At 4:40 AM + 12/10/03, Pete Lomax wrote: Can I ask a stupid question? Guess I'm going to anyway... Is there much benefit to .const, over sticking a value in a register and not modifying it? (which is what I've done to get round this) These are the equivalent of C's #define constants, so

Incorrect scoping of constants in IMCC

2003-12-09 Thread Dan Sugalski
Just ran across a bug in IMCC. The .const directive is incorrectly available only within a .sub/.end block. Silly. (And wrong) That makes it very difficult to usefully use constants--generally they're defined at the top of a file (or in a file which is .included) and visible through the rest

Re: Incorrect scoping of constants in IMCC

2003-12-09 Thread Melvin Smith
At 04:20 PM 12/9/2003 -0500, Dan Sugalski wrote: Just ran across a bug in IMCC. The .const directive is incorrectly available only within a .sub/.end block. Silly. (And wrong) That makes it very difficult to usefully use constants--generally they're defined at the top of a file (or in a file

Re: Incorrect scoping of constants in IMCC

2003-12-09 Thread Melvin Smith
At 10:04 PM 12/9/2003 -0500, Melvin Smith wrote: AWhen someone gets a chance to patch this one up, I'd much appreciate it. Fixed. Parser will not allow .const outside of a compilation unit and make it global to the compilation. .const inside a .sub will be local to the sub only (no change

Re: Incorrect scoping of constants in IMCC

2003-12-09 Thread Vladimir Lipsky
From: Melvin Smith [EMAIL PROTECTED] At 04:20 PM 12/9/2003 -0500, Dan Sugalski wrote: which is .included) and visible through the rest of the compilation unit. Parser will not allow .const outside of a compilation unit and make it global to the compilation. Hmm... What do you mean by a

Re: Incorrect scoping of constants in IMCC

2003-12-09 Thread Melvin Smith
At 07:58 AM 12/10/2003 +0300, Vladimir Lipsky wrote: From: Melvin Smith [EMAIL PROTECTED] At 04:20 PM 12/9/2003 -0500, Dan Sugalski wrote: which is .included) and visible through the rest of the compilation unit. Parser will not allow .const outside of a compilation unit and make it global

Re: Incorrect scoping of constants in IMCC

2003-12-09 Thread Pete Lomax
On Tue, 9 Dec 2003 16:20:25 -0500, Dan Sugalski [EMAIL PROTECTED] wrote: Just ran across a bug in IMCC. The .const directive is incorrectly available only within a .sub/.end block. Silly. (And wrong) That makes it very difficult to usefully use constants--generally they're defined at the top

Re: Incorrect scoping of constants in IMCC

2003-12-09 Thread Luke Palmer
Pete Lomax writes: There's no file level locals yet either ;-) Can I ask a stupid question? Guess I'm going to anyway... Is there much benefit to .const, over sticking a value in a register and not modifying it? (which is what I've done to get round this) Yes. First, if you want more