Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:37 25 Nov 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 : MMbasic n selected sub load global array, odd issue data not stored?

     Page 2 of 2    
Author Message
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 626
Posted: 12:28pm 22 Nov 2025
Copy link to clipboard 
Print this post

I missed the point, I didn't read it in enough depth   .

[  my standard C bug is a conditional test that creeps in when I am tired eg

if (gitchp = 3) dostuff ;

when I should use  '==" instead     . ]   too similar !!
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 496
Posted: 04:08pm 22 Nov 2025
Copy link to clipboard 
Print this post

  mozzie said  Supertech,

The following works on MMbasic for DOS, not sure if its the best solution:

If N = 3 then IF true = 1234 then Condn(n) = 1 else Condn(n) = 0


Pretty sure someone here will have a better way if you need to test the value of True depending on the value of N every loop. Select case or choose perhaps?

Hope this helps  

Regards,
Lyle.


I'd probably use:
If N = 3 And true = 1234 then Condn(n) = 1 else Condn(n) = 0
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4154
Posted: 05:20pm 22 Nov 2025
Copy link to clipboard 
Print this post

  toml_12953 said  I'd probably use:
If N = 3 And true = 1234 then Condn(n) = 1 else Condn(n) = 0

That's what was used and doesn't work (*), for the reasons stated already.

(*) doesn't do what's wanted - MMBasic does work correctly, however

John
Edited 2025-11-23 03:21 by JohnS
 
EDNEDN
Senior Member

Joined: 18/02/2023
Location: United States
Posts: 265
Posted: 05:38pm 22 Nov 2025
Copy link to clipboard 
Print this post

  JohnS said  
  toml_12953 said  I'd probably use:
If N = 3 And true = 1234 then Condn(n) = 1 else Condn(n) = 0

That's what was used and doesn't work (*), for the reasons stated already.


I was surprised nobody considered changing things in this direction:


If N = 3 then if true = 1234 then Condn(n) = 1 else Condn(n) = 0


Ooooops!!!!    Mozzie did suggest this same construct.    My apologies!



.
Edited 2025-11-23 03:40 by EDNEDN
 
     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