## Decimal Value

### Decimal Value

Folks,

I'm probably stupid but I'm actually failing to enter the following command using Spectrum Basic:

LET TEST=123456,789

When I hit the ENTER key I get

LET TEST=123456,?789L

So I'm not able to assign 123456,789 to TEST.

Any help is appreciated.

I'm probably stupid but I'm actually failing to enter the following command using Spectrum Basic:

LET TEST=123456,789

When I hit the ENTER key I get

LET TEST=123456,?789L

So I'm not able to assign 123456,789 to TEST.

Any help is appreciated.

Kind regards Torsten (Berlin)

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

### Re: Decimal Value

Use a dot instead of comma.

HTH,

Zsolt

HTH,

Zsolt

**ZX81**

*(8K)*, ENTERPRISE 128,

*[ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]*

### Re: Decimal Value

Thanks, but this doesn't work, too.

So this was just an example: LET TEST=123456,789

The real value I try to enter is: LET TEST=299792.999 so I believe it doesn't met the number range that can be handled.

So this was just an example: LET TEST=123456,789

The real value I try to enter is: LET TEST=299792.999 so I believe it doesn't met the number range that can be handled.

Kind regards Torsten (Berlin)

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

### Re: Decimal Value

I tried it with an Harlequin 128. With 128k-Basic and also 48K Basic it seems to work, but with "PRINT test" I receive "299793". Is this "round-function" the problem?

With "PRINT test - 1.099" I receive "299791.9" so it seems the variable "test" is correctly stored.

With "PRINT test - 1.099" I receive "299791.9" so it seems the variable "test" is correctly stored.

### Re: Decimal Value

Well... I'm not struggling with a rounding... which works for me as well.

I forgot to mention that I try to enter a Basic command line... for example

40 LET v=299272.999

and here I fail... because here I get : 40 LET v=299272.

Okay... it seems to be, that my installed APU card... is the problem. When it's uninstalled... everthing works fine.

So I need to dig into this problem first, because I'd like to use the arithmetic processor for a calculation where the above command is part of a program.

So thanks for the given feedback so far.

I forgot to mention that I try to enter a Basic command line... for example

40 LET v=299272.999

and here I fail... because here I get : 40 LET v=299272.

**?**999**L****Supplement:**Okay... it seems to be, that my installed APU card... is the problem. When it's uninstalled... everthing works fine.

So I need to dig into this problem first, because I'd like to use the arithmetic processor for a calculation where the above command is part of a program.

So thanks for the given feedback so far.

Kind regards Torsten (Berlin)

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

- 1024MAK
**Posts:**4249**Joined:**Mon Sep 26, 2011 10:56 am**Location:**Looking forward to summer in Somerset, UK...

### Re: Decimal Value

ZX81 and ZX Spectrum basic uses a dot/decimal point/full stop as the separator for the fractional part.

Hence LET TEST=123456,789 will result in a syntax error, indicated by the system refusing to enter the command and instead printing a question mark next to the bit of the entry it’s not happy with. This is the syntax checker at work.

Here is a screenshot of a similar command in a short program where a decimal point is used: This happens to be a ZX81 emulator, but it should work on a ZX Spectrum as well.

Keep in mind that different languages/countries use different symbols for the separator.

In English / the U.K., we use the comma “,” to separate the thousands. Hence you will see 123456.789 written as 123,456.789 with 789 being the decimal fraction.

For more on this see the Wikipedia article

*Mark*### Re: Decimal Value

@1024MAK:

Thanks for your feedback... I do found the problem, which is related to my external Arithmetic Coprocessor Card. Not sure why, without this card, everything works well. So I need to find the (HW/SW?) problem of my card, first.

Again, many thanks

Thanks for your feedback... I do found the problem, which is related to my external Arithmetic Coprocessor Card. Not sure why, without this card, everything works well. So I need to find the (HW/SW?) problem of my card, first.

Again, many thanks

BMZ MFA, ZX80Core/More, AX81, ZX81, ZX81NU, Spectrum+, Harlequin, Amstrad NC100, Z88, C64, C128D, Amiga 500, Amiga 1200, Atari Portfolio, HP200LX, IBM PC 5155, TP755c, T41, PS/2 (Model 40SX), PS/2E, Accura 101, Apple //e

### Re: Decimal Value

Where do you install such a card on a Spectrum?

### Re: Decimal Value

What card is it??

*Ernesto*ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come