|
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
|
| 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 (URL) Message----- From: news-gateway@lugnet.com (...) (26 years ago, 22-Feb-99, to lugnet.robotics.rcx.nqc)
|
Message is in Reply To:
| | RE: NQC 1.2 in beta testing
|
| 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 (...) (26 years ago, 22-Feb-99, to lugnet.robotics)
|
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
|
|
|
|