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 / 7
6  |  8
Subject: 
RE: NQC 1.2 in beta testing
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Mon, 22 Feb 1999 13:23:23 GMT
Viewed: 
2348 times
  
Well, those are still cool new functions...I will keep wishing the RCX
firmware allowed runtime evaluations instead of constants. Maybe LegOS
does...does anyone know?

Rich
http://rich.cmcsmart.com


-----Original Message-----
From: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com]On Behalf
Of Dave Baum
Sent: Monday, February 22, 1999 1:14 AM
To: lugnet.robotics@lugnet.com; lugnet.robotics.rcx.nqc@lugnet.com
Subject: Re: NQC 1.2 in beta testing


In article <NCBBILBBCKPIJMFPELKOCEJPCCAA.richone@midsouth.rr.com>, "Rich
Thompson" <richone@midsouth.rr.com> wrote:

Some questions about proposed features

Proposed Features
* Allow variables to be scoped to tasks and inline functions
* Parameter passing and return values for inline functions

If I am reading these right, would the above new features allow RCX
*runtime* variable usage for commands like:

int foo,bar;

task sound
{
       foo = 300 + Random(300)
       bar = 1 + Random(20)
       PlayNote(foo, bar);
}

Rich
http://rich.cmcsmart.com


No, you still wouldn't be able to do that since the RCX bytecode to play a
tone requires compile time constants as its arguments.

The scoping would let you put variables inside of tasks (hiding them from
other tasks), if you wanted...

task foo
{
  int a;
  // can use variable a
}

task bar
{
  // can't see variable a
}

The inline stuff would let you write functions that took arguments - but
these arguments could only be used in places where variables are legal
(such as comparissons, and the Sleep() macro).

Dave

--
reply to: dbaum at enteract dot com



Message has 1 Reply:
  Re: NQC 1.2 in beta testing
 
The thing to remember about legOS is that pretty much anything you can do in C (gcc, egcs) in 32k of RAM, you can do with legOS. I believe that both legOS and NQC have definite places in the RCX programming universe. I happen to have been using gcc (...) (26 years ago, 22-Feb-99, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: NQC 1.2 in beta testing
 
(...) No, you still wouldn't be able to do that since the RCX bytecode to play a tone requires compile time constants as its arguments. The scoping would let you put variables inside of tasks (hiding them from other tasks), if you wanted... task foo (...) (26 years ago, 22-Feb-99, to lugnet.robotics, lugnet.robotics.rcx.nqc)

5 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