Subject:
|
Re: Syntax for reserving variables in NQC?
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sat, 3 Jun 2000 03:21:03 GMT
|
Viewed:
|
2259 times
|
| |
| |
In article <3938449F.3FA8D2E@nexen.com>, sjm@judgement.com wrote:
>
> How about:
>
> #pragma reserve 1 3 5-8 9
I went with simple...
#pragma reserve start [end]
where [end] is assumed to be start if not specified. If you want to
reserve multiple vars (or multiple ranges) you need to use multiple
#pragmas.
>
> Personally I find the discussion entertaining but somewhat
> academic since I have no clue how to use a reserved register
> in nqc. If it is not a variable or a counter how can you
> access it? Is there any purpose beyond counters?
Yes, its all a bit academic. The only immediately obvious use is to
tell nqc not to use the bottom 1 or 2 locations for vars if you plan on
using counters. I don't see the #pragma being used for much else, so
I'm not putting a lot of effort into implementation.
The only reason I'm not restricting it to counters-only is that perhaps
someone will come up with a good reason to reserve certain var
locations. You could still access them with the proper @() expressions
and set them with the Set() function.
Dave
--
reply to: dbaum at enteract dot com
|
|
Message is in Reply To:
| | Re: Syntax for reserving variables in NQC?
|
| (...) How about: #pragma reserve 1 3 5-8 9 with range explicitly specified by "-". Then those that want to specify a range can do so and those who want to specify a list can do so. Of course this assumes that you don't allow arithmetic in the pragma (...) (24 years ago, 2-Jun-00, to lugnet.robotics.rcx.nqc)
|
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|