... we have CONST, with a completely different math subsystem, and has been nothing but trouble for years.
A completely different math subsystem. Really? I like CONST, but I've always assumed that a CONST is exactly like a standard variable except that you can't change its value. Does it need to be more complicated that that? Again, I seem to have been using something about which I know nothing.It basically has its own parser in the compiler that evaluates expressions entirely independently of regular maths, and has caused no end of annoyances.
It basically has its own parser in the compiler that evaluates expressions entirely independently of regular maths, and has caused no end of annoyances.
Hey is that Fellippe looking out the Windmill?
@bplus Like you I did notice the -ve signs causing problems. But I now have my own rule that a CONST may not have any maths in it. Only simple CONST x = 1, and I have altered my pi-in-the-sky code accordingly. When I have finished adding explanatory comments throughout, it will be ready to update the whole thing for 1.4 compatibility.
Here is the ScreenY% change and lampY% change so it fits my screen on laptop:
Rats some Y's are based on ScreenY and some are not, so I fix sails and windmill and then the images in graves are off... oh well.
@bplus As I (in a cack-handed way without proper project planning) defined variables arbitrarily from top/bottom, left/right, would not RESIZE be something better for you to get the display to fit your screen size without having to manually change certain variable values?
I'd thought 1.4 had corrected the CONST issues --
Something tells me we wont learn a lesson from this...
CONST (that CONSTANT headache):
Quotes:
STxAxTIC
Re: Pi-in-the-Sky Graphics Demonstration Program (with 3D)
« Reply #20 on: April 19, 2020, 11:07:25 AM »
CONST may as well be a DATA statement. We have variables, we know how to use them. That system is constantly checked for error and has been proven to be quite stable.
Here on the other hand we have CONST, with a completely different math subsystem, and has been nothing but trouble for years.
I say we lock CONST at the QB45 standard and never look back.
luke
Re: Pi-in-the-Sky Graphics Demonstration Program (with 3D)
« Reply #23 on: April 19, 2020, 12:45:00 PM »
It basically has its own parser in the compiler that evaluates expressions entirely independently of regular maths, and has caused no end of annoyances.
From herein, I will only use CONST without any mathematical manipulations: CONST x = 1. For anything else I will use standard variables, and if it needs to be constant it'll get DIM SHARED.
To satisfy STxAxTIC and to simply developers' lives why not make this the CONST attribution in future?
That's what I was kinda thinking: a simple case of names not matching the lookup values. All we probably need is a simple routine to strip symbols off before looking up the names from our internal list.
Does the following work?
CONST X! = 3.14
CONST Y! = 2 * X
PRINT X, Y
If you notice, the second line is using X without the specific symbol attached. At the moment, I'm thinking the glitch is probably only on the right side of the = sign.
(IF it works, try it with X! and see if that breaks it. If so, I think it'll be a trivial fix once I get my PC back and can address the issue.)
Incidentally, the program is slightly updated: now all the scenes have appropriate audio.