HP Forums
Prime OS Error? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Prime OS Error? (/thread-22035.html)



Prime OS Error? - toml_12953 - 07-15-2024 02:43 PM

I don't know if this was caused by updating to the beta version of the OS or not but it used to work:

I have a small routine (below) that I used to call from other programs and it worked fine. Now, however, I get a syntax error when I try to call it.

Code:
EXPORT TAB()
BEGIN
  LOCAL I,T;
  T:="";
  FOR I:=1 TO X DO
    T:=T+" ";
  END;
  RETURN T;
END;

Called by:

Code:
PRINT(TAB(14));



RE: Prime OS Error? - rprosperi - 07-15-2024 03:17 PM

Is X global?

How does the 14 get passed to X (I think the intention here)?


RE: Prime OS Error? - toml_12953 - 07-15-2024 03:36 PM

(07-15-2024 03:17 PM)rprosperi Wrote:  Is X global?

How does the 14 get passed to X (I think the intention here)?

You nailed it. Somehow in editing, I lost the X in the parentheses. It works fine now. Oops!