Subject:
|
Re: Syntax for reserving variables in NQC?
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sun, 28 May 2000 22:44:13 GMT
|
Viewed:
|
2063 times
|
| |
| |
In article <3931A0AA.7AA6DEB1@3dgamers.com>, Jan-Albert van Ree
<javanree@3dgamers.com> wrote:
> Dave Baum schreef:
>
> > At present I'm leaning more towards a #pragma rather than introducing
> > another keyword into the language...
> >
> > // reserve RCX variable location 1
> > #pragma reserve 1
> >
> > How does this sound? Would people prefer a language construct for this
> > (and if so, what should it be)?
>
> It looks perfectly logical to me. Will it be possible to reserve a range
> or
> do we need to reserve each location separately?
Handling a range should't be too tough - perhaps like this
#pragma start [count]
where count is assumed to be 1 if not present
// reserve location 1
#pragma 1
// reserve locations 5,6 and 7
#pragma 5 3
---
The alternative would be
#pragma start [end]
where end is assumed to be equal to start
#pragma 1
#pragma 5 7
---
One thing I'm not going to do is all that range stuff assemblers
typically handle in a move-multiple instruction...
#pragma 1-3,5,7-10
Lots of extra parsing work for me for what in the end will probably
never be used!
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message has 2 Replies: | | Re: Syntax for reserving variables in NQC?
|
| (...) I would suggest leaving it simple. For example: #pragma 1 Would reserve var. one. #pragma 1 5 9 10 31 Would reserve var.'s 1, 5, 9, 10 & 31 It's the easiest to see at a glance and would be easy to adjust as you changed your code. Dean -- (...) (24 years ago, 29-May-00, to lugnet.robotics.rcx.nqc)
|
Message is in Reply To:
| | Re: Syntax for reserving variables in NQC?
|
| Dave Baum schreef: (...) It looks perfectly logical to me. Will it be possible to reserve a range or do we need to reserve each location separately? No need for an extra keyword indeed. (It's hard enough already. Well I guess part of that comes from (...) (25 years ago, 28-May-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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|