Octal, byte array, byref string

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Octal, byte array, byref string

Post by YahooArchive »

From the help line

reporting
x = &33

or something similar causing a hang of the compiler, which in 7.35
causes an error, as we don't support Octal numbers

Having grown up as an engineer at HP, we didn't do octal, that was
for DEC, and since DEC is long gone, but HP remains, we probably
won't do Octal in ARMbasic :)

A request for keyword for bytearray vs using string for everything

How about

#define ByteArray String

When functions are called with a BYREF string, the length field is
rejected and will cause errors. This is spelled out in the Syntax
diagram for FUNCTION/SUB. We could add examples for all the cases,
but probably won't. The HelpFiles will probably always be a work in
progress, but the intention is not to make them a tutorial, as we try
to be a proper subset of most BASICs, there is enough and far better
tutorials of BASIC out there on the web. And as the HelpFile is now
exceeding 500 pages, it gets to a point where people don't even look
there because its too big. So it is a balance, and we do entertain
input on how to improve it. But a better set of examples are really
to be found in the real life BASIClib files for all the string and
hardware functions.



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Octal, byte array, byref string

Post by YahooArchive »

The &10 was purely a mistyping for $10 on my part. It was not intended to be
Octal. I only reported it because it hung the compilation process. An error
would have been fine but the hang is darned inconvenient, especially if it takes
several tries to find the cause.

#define ByteArray String - good suggestion - thanks.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Octal, byte array, byref string

Post by YahooArchive »

> The &10 was purely a mistyping for $10 on my part. It was not
intended to be Octal. I only reported it because it hung the
compilation process. An error would have been fine but the hang is
darned inconvenient, especially if it takes several tries to find the
cause.
>

We DO want reports of things like this that cause the compiler to hang.

Imagine us trying to find all these. Its very hard to find all the
errors that the compiler interprets wrong or causes a hang.

Per the Infinite Monkey Theorem, maybe we could employ a bunch of them
to type on keyboards, and use that as a test case.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Octal, byte array, byref string

Post by YahooArchive »

Yes that's what I thought. I trust the first example I reported did reproduce.

Thanks for the excellent product and support.

Post Reply