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 : CMM2: V5.05.06RC19: Scotty more power
Page 3 of 4 | |||||
Author | Message | ||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
thinBasic, RobotBASIC, QB64 all return var as the true/false result of the test. PUREBASIC complains about syntax. Micromites and Maximites! - Beginning Maximite |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5914 |
In PUREBASIC you need bool() b=7 c=7 a=Bool(b=c) Debug a It forces you to be clear about what yu are doing... VK7JH MMedit  MMBasic Help |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3019 |
FWIW: DOS MMBasic Ver 5.05.02 Copyright 2011-2019 Geoff Graham > a=1: b=2: c=a=b: print a,b,c 1 2 0 > b=1: c=a=b: print a,b,c 1 1 1 > a=0: c=a=b: print a,b,c 0 1 0 > a=2: c=a=b: print a,b,c 2 1 0 > b=2: c=a=b: print a,b,c 2 2 1 > ~ Edited 2020-11-16 07:24 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
Nice! Thank you. Micromites and Maximites! - Beginning Maximite |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1098 |
From Mr. Scott, if speed is important Captain, then c = a = b is fastest, c = (a = b) is about 10% slower, and if/then constructs are slower still! .... but I do think that the a = b = c construct is not intuitively obvious, particularly to a newcomer to programming languages. Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3019 |
Further FWIW, MM2 MUP V3 > ?mm.ver 5.041 > dim integer a,b,c > a=1: b=2: c=a=b: print a,b,c 1 2 0 > b=1: c=a=b: print a,b,c 1 1 1 > a=0: c=a=b: print a,b,c 0 1 0 > b=2: c=a=b: print a,b,c 0 2 0 > And Armmite F4: ARMmite MMBasic Version 5.05.08 Copyright 2011-2019 Geoff Graham Copyright 2016-2019 Peter Mather > dim integer a,b,c > a=1: b=2: c=a=b: print a,b,c 1 2 0 > b=1: c=a=b: print a,b,c 1 1 1 > a=0: c=a=b: print a,b,c 0 1 0 > b=2: c=a=b: print a,b,c 0 2 0 > a=2: c=a=b: print a,b,c 2 2 1 > I agree that this is not a BASIC construction that I would ever have thought to use, and knowing about it, for the sake of clarity I would not use it. But that's a personal preference. Edited 2020-11-16 10:19 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
V5.05.06RC20 posted http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip Fixes bug when a program contains duplicate function names - now you will get the error message but the program won't be loaded so the message won't re-occur allowing you to edit the program to fix the bug Fixed bug in calling string functions with a calculated string. This bug was introduced to try and improve the depth to which recursion could take place before the stack is used up but it was an "optimisation" too far. Fixed typo in the RGB332 mapping table for blue Changed MM.INFO(FILESIZE name$) to return -2 when the "name$" refers to a directory. This allows you to distinguish between a missing file and a directory. Added CAT as a synonym for INC to make use with strings more obvious e.g. CAT string1$, string2$ 'appends string2$ to string1$ Attempting to use a location in an array in MATH commands and functions that require an array as a parameter will now give an error. Trying to use the same array for the output of MATH M_MULT or MATH V_MULT as one of the inputs now gives an error Fixes a bug in the triangle drawing routine when the coordinates are co-linear and not ordered A FILL of -1 no longer causes the TRIANGLE sub to give an error - code now matches the manual Major rewrite of graphics primitives for BLIT to give significant performance improvement Edited 2020-11-17 03:17 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3850 |
Thanks Peter my tools are working again and my unit-tests passing The enhancement to MM.INFO(FILESIZE name$) is also appreciated. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1133 |
Hi Peter, thanks for your efforts! The editor (colour coded syntax) does not recognize INC, CAT or MMDEBUG. Is that intentional? It seems someone has changed the restrictions on the maximum number of commands (now 132). Regards Michael Edited 2020-11-17 06:02 by twofingers |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
Forgot to add them - will be in next version No, just some behind the scenes magic |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3850 |
No, just some behind the scenes magic As I understand it, if commands are synonyms of each other e.g. COLOUR and COLOR or INC and CAT they only require one command/token/slot. Tom Edited 2020-11-17 06:18 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1133 |
I doubt it, but peter will explain ... someday. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3850 |
I doubt it, but peter will explain ... someday. Suit yourself, it's not magic, plus he kindly told me how it was done in a PM Strictly speaking (again as I understood the explanation) he is pre-processing the source to handle the synonyms when it is loaded into the flash. Tom Edited 2020-11-17 06:29 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 532 |
RC20, LOCAL STRING dt = MM.INFO$(MODIFIED f) not work, complaining about string needed (but f is also string, in RC19 works OK)... In command line somehow works Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3558 |
@matherp Are these performance improvements achievable for other platforms (MM2, MM+, ARMmite) possible ? PicomiteVGA PETSCII ROBOTS |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5914 |
LOCAL STRING dt = MM.INFO$(MODIFIED f) not work, complaining about string needed (but f is also string, in RC19 works OK)... In command line somehow works Your problem is caused when you try to get the time of a directory. It works as expected with files. but now returns a number with directories. OPTION EXPLICIT OPTION DEFAULT NONE print NCdateTime("fm.bas") ' works as expected print NCdateTime("test") ' test is a directory - gives an error FUNCTION NCdateTime(f as string) AS STRING 'prepare date and time of file LOCAL STRING dt = MM.INFO$(MODIFIED f) IF dt<>"" THEN dt = MID$(dt, 3, 14) NCdateTime = dt END FUNCTION Nice program by the way. Jim VK7JH MMedit  MMBasic Help |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
It works as expected with files. but now returns a number with directories. It used to return a blank string with directories but actually there is no reason it can't return a valid modified date so I'll make it do this in the next release |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 532 |
Thanks Peter, I already sought for reason, why dirs have no time of change... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
bar1010 Senior Member Joined: 10/08/2020 Location: United StatesPosts: 197 |
I'd love to have an up-to-date printed manual. For info this INC or += suggestion came up for MMBasic before and was rejected. I'm glad it finally made it. I'd love to know which (if any) of these improvements Peter has made will make it to MMBasic for the Original Maximites and the Micromites. Thank you Peter and Geoff. Bill Please, please, please release it! Plus two. I also would like to have an up-to-date printed manual. |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 446 |
I'd love to have an up-to-date printed manual. For info this INC or += suggestion came up for MMBasic before and was rejected. I'm glad it finally made it. I'd love to know which (if any) of these improvements Peter has made will make it to MMBasic for the Original Maximites and the Micromites. Thank you Peter and Geoff. Bill Please, please, please release it! Plus two. I also would like to have an up-to-date printed manual. Peter still working on the new version, adding new features and fixing bugs. I like the Linux Mint release process and it can be applied here... When will it be released? When ready |
||||
Page 3 of 4 |
Print this page |