On Mon, 04 Jan 2021 09:38:19 +0000, Joe wrote:
> On Sun, 3 Jan 2021 22:40:33 -0000 (UTC)
> Martin Gregorie wrote:
>
>> On Sun, 03 Jan 2021 21:16:36 +0000, Joe wrote:
>>
>> > On Sun, 3 Jan 2021 19:36:54 -0000 (UTC)
>> > Martin Gregorie wrote:
>> >
>> >> A fairly rapid web search failed to discover whether unsigned
>> >> arithmetic is a feature of the BASIC
>> >
>> > There is no feature list of BASIC.
>> >
>> I know that all so-called BASICs differ, some radically from the
>> original Dartmouth BASIC. I thought that the context would make it
>> plain that I was talking about PICAXE BASIC, which differs enough from
>> traditional BASICs to be given another name (labels not numbers for
>> branch destinations and subroutines, long names for variables, named
>> constants, unsigned arithmetic and comparisons, conditional statement
>> inclusion).
>>
>> > No. All the arithmetic operators are signed,
>> >
>> Not according to the current PICAXE BASIC manual, which gives numeric
>> ranges for 8 and 16 bit variables capable of containing byte values in
>> the range 0-255 and explicitly says that byte values are unsigned.
>> It alao says that 16 bit variable can hold 0-65535, which implies,
>> though it doesn't state, that these are unsigned.
>
> Sorry, misunderstanding. I thought you were asking if PICAXE couldn't do
> signed because the underlying PIC processor couldn't handle signed.
No problem. At least this made me look at the PIC architecture and
discover that it doesn't handle signed integers - I think its the only
system I've know of at that doesn't, so I didn't realise at first that
this limitation is in the hardware rather than a feature of the BASIC
compiler.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|