Page 1 of 1

[Implemented] Word is signed

Posted: Thu Aug 12, 2004 1:30 pm
by Edwin Knoppert
Help shows Integer aspects for Word.
I want to have a word variable (65000 etc..)

In this case help should mention integer, not word.

Posted: Thu Aug 12, 2004 7:06 pm
by GPI
All variables are signed? Where is the problem.

btw:

Code: Select all

w.w=-1
l.l=w % $ffff
debug l

Re: Word is signed

Posted: Thu Aug 12, 2004 8:32 pm
by tinman
Edwin Knoppert wrote:Help shows Integer aspects for Word.
I want to have a word variable (65000 etc..)

In this case help should mention integer, not word.
Which would only help to confuse the issue since in the language they are words, not integers. Unless you propose that .w be changed to .i?

Word (in all the times I've seen it) reflects only the size of the variable, usually 16 bits. Whether it is signed or unsigned is up to the compiler/application.

Shouldn't this be in the feature requests section anyway? Loads of people have asked for unsigned versions of all the built in types.

Posted: Thu Aug 12, 2004 9:47 pm
by Edwin Knoppert
??? confused mode = true

Of course it matters.
image i used a word for looping from 0 to 64000 ?

Main issue to me is that w (which behaves as signed integer) should accept w.w = 64000 for example.
I did not test this.
But that's confusing isn't?

PB should make it an integer w.i or so and w.w for word.

Posted: Fri Aug 13, 2004 12:36 am
by Kale
Help shows Integer aspects for Word.
I want to have a word variable (65000 etc..)
In this case help should mention integer, not word.
Hmmm, I beg to differ here, as I have always though and read, the term integer means any of the natural numbers, the negatives of these numbers, or zero.
Wikipedia wrote:The integers consist of the natural numbers (0, 1, 2, ...) and their negatives (-0, -1, -2, ...; -0 is equal to 0 and therefore not included as a separate integer).
The term Word as it refers to computer systems is the range of these integers.
Wikipedia wrote: The term word initially was equivalent to ‘the logical size of an address of a location in the system memory’, and was thus CPU- and OS-specific. One could say that the IBM System/360 had 32-bit words (even though its addresses were limited to 24 bits), and the 8086 had 16-bit words.
I think maybe the term 'integer' has been confused with the term 'unsigned word'. :?:

http://en.wikipedia.org/wiki/Integer_%2 ... science%29

Posted: Fri Aug 13, 2004 1:21 am
by freedimension
Edwin Knoppert wrote: Of course it matters.
not :D
image i used a word for looping from 0 to 64000 ?
You wouldn't want to do so, as it's slower than looping using a Long ;-)