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 : Can you (would you) += in MMBasic
Page 4 of 4 | |||||
Author | Message | ||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
greatcowbasic lets you use a++ instead of a=a+1 also a--- instead of a=a-1 but a++b instead of a=a+b would be better. inc is ok. what if it's float? |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
Thanks Geoff, I don't think the good old Micromite is fully appreciated by many of the newer shedders and many could learn a lot from reading the articles on your website. @Stan Easy enough to test: Bill Keep safe. Live long and prosper. |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
You get a more reasonable result of 2.25 if you include the comma before 0.5 PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
Doh! Thanks Lizby without the comma it is just incrementing by one and ignoring the 0.5. I wasn't paying proper attention. Bill Keep safe. Live long and prosper. |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 339 |
If you wanted to do that, it would be better to follow what official BASIC already uses: MAT READ a DATA 202,80,50,60,0,0,0 Edited 2024-01-20 14:52 by toml_12953 |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
Dim a(6) = (202,80,50,60,0,0,0) > list Dim a(6) = (202,80,50,60,0,0,0) For b = 0 To 6 : Print a(b): Next > run 202 80 50 60 0 0 0 > Note: zero base array Bill Keep safe. Live long and prosper. |
||||
Page 4 of 4 |
Print this page |