To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 630
629  |  631
Subject: 
Re: Syntax for reserving variables in NQC?
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 2 Jun 2000 23:34:55 GMT
Reply-To: 
(sjm@judgement.)stopspammers(com)
Viewed: 
2147 times
  
Dean Husby wrote:

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.

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 statement otherwise "-" becomes ambiguous.

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?



Message has 1 Reply:
  Re: Syntax for reserving variables in NQC?
 
(...) 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. (...) Yes, its all a bit academic. The only (...) (24 years ago, 3-Jun-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  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)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR