I tried to use the power command
plot2screenram:
pixel = py%8 ; pixel position
pixel=power(1,pixel)
ptr=((py/8)*128)+px ;screen byte
buffer (ptr)=buffer (ptr) or pixel ;plot pixel in buffer
and get this error.
gcb_plot-not-working.gcb (150): Error: Invalid variable name: POWER1,PIXEL
gcb_plot-not-working.gcb (150): Error: Variable POWER1,PIXEL was not explicitly declared
gcb_plot-not-working.gcb (187): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (187): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (187): Error: Variable POWER(1,PIXEL) was not explicitly declared
gcb_plot-not-working.gcb (191): Error: Variable ROW was not explicitly declared
gcb_plot-not-working.gcb (202): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (202): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (217): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (217): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (231): Error: Cannot store -1 in the byte variable SY
gcb_plot-not-working.gcb (245): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (245): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (268): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (268): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (298): Error: Cannot store -1 in the byte variable SY
gcb_plot-not-working.gcb (310): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (310): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (332): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (332): Error: Invalid variable name: POWER(1,PIXEL)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to use the power command
plot2screenram:
pixel = py%8 ; pixel position
pixel=power(1,pixel)
ptr=((py/8)*128)+px ;screen byte
buffer (ptr)=buffer (ptr) or pixel ;plot pixel in buffer
and get this error.
gcb_plot-not-working.gcb (150): Error: Invalid variable name: POWER1,PIXEL
gcb_plot-not-working.gcb (150): Error: Variable POWER1,PIXEL was not explicitly declared
gcb_plot-not-working.gcb (187): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (187): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (187): Error: Variable POWER(1,PIXEL) was not explicitly declared
gcb_plot-not-working.gcb (191): Error: Variable ROW was not explicitly declared
gcb_plot-not-working.gcb (202): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (202): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (217): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (217): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (231): Error: Cannot store -1 in the byte variable SY
gcb_plot-not-working.gcb (245): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (245): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (268): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (268): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (298): Error: Cannot store -1 in the byte variable SY
gcb_plot-not-working.gcb (310): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (310): Error: Invalid variable name: POWER(1,PIXEL)
gcb_plot-not-working.gcb (332): Error: Array/Function PIXEL=POWER has not been declared
gcb_plot-not-working.gcb (332): Error: Invalid variable name: POWER(1,PIXEL)
I am guessing you are using a stock installation of Great Cow BASIC, version 0.96.0.
No idea what is causing this error.
Please post your user code, or, a section that should compile to reproduce the error.
Best to do this whenever you post. Use add attachment for user code.
Have you looked at the demo's? Is there a power example?
I just tried the Help file example and that compiles ok.
The errors are symptomatic of not including maths.h in the source code
Make sure the following line is in the GCB source code
Without seeing the GCB source code, not much more help can be provided.
Last edit: William Roth 2017-02-22
Thanks. just power and logs,I didn't notice works with <maths.h></maths.h>