Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sys-RPL error

3 views
Skip to first unread message

Stephen Hicks

unread,
Dec 20, 1998, 3:00:00 AM12/20/98
to
I was converting a program i wrote to Sys-RPL (my first real sys-rok
program) and when i tried to compile it, i got several errors about my
LOOP's being unmatched or something of that sort.

Here are two of the loops that gave me errors:

* Takes a copy of a list and makes sure every element is a real
INNERCOMP
ZERO_DO
:: CK&DISPATCH1 ( must be N reals )
real DROP
;
LOOP ( a has correct types )


* f, n, and vs are defined above as GETLAM's
f INCOMPDROP
n ZERO_DO
vs SYMWHERE n ROLL
LOOP

Thanks in advance
--
Stephen Hicks
mailto:hi...@tampabay.rr.com
homepage: http://home.tampabay.rr.com/kupopo/
ICQ: 5453914

Andre Schoorl

unread,
Dec 21, 1998, 3:00:00 AM12/21/98
to
In article <U6gf2.2762$Ji3...@newse2.tampabay.rr.com>, Stephen Hicks wrote:
>I was converting a program i wrote to Sys-RPL (my first real sys-rok
>program) and when i tried to compile it, i got several errors about my
>LOOP's being unmatched or something of that sort.
>
>Here are two of the loops that gave me errors:
>
>* Takes a copy of a list and makes sure every element is a real
> INNERCOMP
> ZERO_DO
> :: CK&DISPATCH1 ( must be N reals )
> real DROP
> ;
> LOOP ( a has correct types )
>
>
>* f, n, and vs are defined above as GETLAM's
> f INCOMPDROP
> n ZERO_DO
> vs SYMWHERE n ROLL
> LOOP

Try putting the LOOP in square brackets, i.e. [LOOP]

--
Andre Schoorl <asch...@engr.uvic.ca> PGP key available on request/keyserver
Comp Engineering, UVic, Canada Linux/HP48 http://www.engr.uvic.ca/~aschoorl/

DST12345

unread,
Dec 21, 1998, 3:00:00 AM12/21/98
to
You have to put a (DO) after the ONE_DO, check out Programming in System RPL in
the documents section at www.hpcalc.org.

Let me know how you do at your first attempt, I am also trying to write my
first program :)

Dennis

John H Meyers

unread,
Dec 21, 1998, 3:00:00 AM12/21/98
to
In article <U6gf2.2762$Ji3...@newse2.tampabay.rr.com>,
Stephen Hicks wrote:

> I was converting a program wrote to Sys-RPL
> and when I tried to compile it, I got several errors


> about my LOOP's being unmatched or something of that sort.

Only HP's RPLCOMP complains like this; it keeps track of a few
things not necessary for compilation, but which are handy for
helping the programmer to detect possible oversights;
however, it does not have enough "AI" to recognize all the
"compound words" which contain "DO" and "LOOP" etc.; thus it
often complains inappropriately about perfectly fine source coding.

Various ways to suppress any invalid complaints are covered in
RPLCOMP.DOC on page 5, under the "Control Structures" topic;
I believe that the compiler should output the correct code
anyway, even if it "nags" you with these messages.

If you like to write code that compiles equally well under either
RPLCOMP or Jazz, this presents a slight problem; Jazz will not like
the "square bracket" notation of RPLCOMP, but probably it will
always accept the "parentheses" alternative, which allows, e.g.
ZERO_DO (DO) to be compiled correctly by either compiler, with
RPLCOMP actually "counting" the "(DO)" (without generating code),
and Jazz just totally ignoring it as a comment.

Trying to satisfy everybody at the same time remains one of those
nearly impossible things, however :)

-----------------------------------------------------------
With best wishes from: John H Meyers <jhme...@mum.edu>

0 new messages