FXY Function

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
User avatar
AN7805
Posts: 91
Joined: Fri Oct 16, 2020 4:17 am

FXY Function

Post by AN7805 »

Hi at all,

How to activate the FXY function on the keybord?
I don't find this function.

Thanks,

Matt
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: FXY Function

Post by XavSnap »

"FXY function" don't exist in the Zx81.
May be an array variable: DIM FXY(10) >>> LET A=FXY(INT(RND*10)+1)
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
AN7805
Posts: 91
Joined: Fri Oct 16, 2020 4:17 am

Re: FXY Function

Post by AN7805 »

Thanks Xav.

I text "FXY" normally with the keyboard?

Thanks,

Matt
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: FXY Function

Post by 1024MAK »

Are you trying to type in a program listing? If yes, could you please post up a copy so we can see it.

Or are you trying to write your own program? In which case, can you tell us what you are trying to do?

The ZX81 only accepts the keywords as printed on the keyboard. It will not accept keywords typed in letter by letter.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
AN7805
Posts: 91
Joined: Fri Oct 16, 2020 4:17 am

Re: FXY Function

Post by AN7805 »

Thanks, Mak.

I'm not able to plotting this program:

Image

To the string 80 i have a syntax error.

Where is the error?

Thanks.

Matt
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: FXY Function

Post by XavSnap »

Mark is right, "F"+"X"+"Y"...

In a type in program, if the there is a function in a PRINT or VAL(), you had to type the keyboard quick function:

A=VAL "NOT PI" must be type "NOT"+"PI"... two tokens in basic.
In case of natural type in, value by value, the Basic will stop with the 2/x error.

In case of :
IF A$="" THEN
OR
LOAD ""
Type two cotes, the special key "" is only used in a PRINTed coted lines.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: FXY Function

Post by XavSnap »

Cap0103.jpg
Cap0103.jpg (4.76 KiB) Viewed 2342 times
:mrgreen:
just add a comma in the PLOT command...
80 IF L(K)>=F(K) THEN PLOT K+4,10+L(K)

Code: Select all

10 DIM F(24)
20 DIM L(24)
30 FOR Y=1 TO 10
40 FOR X=1 TO 12
50 LET K=X+Y-1
60 LET A=(X-6)*(X-6)+(Y-5)*(Y-5)
65 LET FXY=15*EXP (-A/5)
70 LET L(K)=FXY+Y
80 IF L(K)>=F(K) THEN PLOT K+4,10+L(K)
90 IF L(K)>=F(K) THEN LET F(K)=L(K) 
100 NEXT X
110 NEXT Y
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: FXY Function

Post by PokeMon »

FXY is not a function, it is simply a numeric variable (name) in the listing. And it is not an array.
User avatar
AN7805
Posts: 91
Joined: Fri Oct 16, 2020 4:17 am

Re: FXY Function

Post by AN7805 »

Xavier now i see the error;

80 IF L(K)>=F(K) THEN PLOT K+4,10+L(K)

I don't put the comma after 10.
On the program list is an error, the comma are missing.

Thanks,

Matt
User avatar
AN7805
Posts: 91
Joined: Fri Oct 16, 2020 4:17 am

Re: FXY Function

Post by AN7805 »

Yes !! :ugeek:

Image

Thanks at all m(_ _)m

Matt
Post Reply