Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:56 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Sugestion: a small basic test program to test the basic interpreter

     Page 2 of 2    
Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 10:04pm 10 Mar 2023
Copy link to clipboard 
Print this post

  Quote  And when I tried to discuss it with my Maths teacher wife she just wanted to have an argument and disown me for using the term "minus" rather than "negative" or "subtract"


And there is the problem. "Minus" can be a catch-all for "negative" or "subtract" but they are not quite the same. "negative" is a property of the number to which it is attached and "subtract" is an operator.

3 - 2  and  3 + -2  give the same result but - 2 and -2 are not the same. the first is two items, an operator and a number the second is just a number.

Basic ignores spaces in expressions making it ambiguous unless () are used to clarify.
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 582
Posted: 12:41am 11 Mar 2023
Copy link to clipboard 
Print this post

  Quote  Easily sorted. Don't use silly maths. Check your bounds first. :)


+1

Makes me wonder how to implement complex variables. I guess they have certain number of bytes for handling/storage etc, and then the math libraries cogitate on them easily enough. Probably need to define a complex number datatype ..

Not trying it though !!!
Edited 2023-03-11 10:43 by zeitfest
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025