We are producing test programs. Once we have the basics running on our tests rigs we can get help to test in the real world. The first goal is to get Singles working, we already have made compiler changes and we have basic maths working to show Single float values on the terminal.. mySingle = 4.321 actually shows up on a serial terminal... this means ram representation and some basic maths convert the Single into Integers for display.
Once we have a version ready will publish to the Dev Channel on GCSTUDIO
Look an update on our progress.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have something that we could share with the constraints we are aware of.
We are focusing on float support adding the minimum functions needed for singles would be +, -. *, /, SingleToString() (so it could be displayed) and SingleToHex()
SingletoString function supports +/-999999.99999999 this is good enough for a utility function. We have another 3 decimal routine that shows how to extract the integer and decimal components.
We have resolved many, many issues and there are many to be resolved.
See this video for an insight into the progress.
Want to play ? The more folks testing the better.
❤️
2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Advanced variables are only supported by a subset of the functions of GCBASIC - you may need to write your own functions, if you need them. :-)
If the function is NOT shown below assume the function is NOT supported. If you use a function that is not shown below then you may get a silent failure and you may not get the results you expected.
The functional characteristics are:
Dimensioning of single variable type in user program.
Assigning advanced variables creation of values from constants.
Assigning advanced variables creation of values from singles and constants using addition and subtraction.
Assigning a IEEE574 HEX constant value to a single.
Multiplication and division of single variable type
Assigning single to long and long to single.
The assignment of a single or a double to a long also deals with byte and word.
Copying between variables of the same type (single to single).
Assigning unit value of a single or double variable to a long variable.
Setting of advanced variable bits.
Addition and subtraction of advanced variables.
Boolean operators of advanced variables.
Use of float variable(s) as global variables.
Functions and sub routines supported including passing float variable(s) as parameters to methods ( sub, function and macro)
Extraction of unit and/or mantissa value to string functionality
SingleToHEX - convert a single to a string IEEE574 HEX
StringToSingle - convert a string to a single.
SingleToString - convert a single to a string.
Conditional statements
Calculation of the modulo of a single variable
Dimensioning of longInt, ulongInt and double variable types in libraries.
Int() for Single variables
Assigning double to long and long to double
Assigning a single to double and double to single
Rotate of double, longInt & ulongInt advanced variables.
Negate for advanced variables.
Demos are available
GCode Helper updated
Help updated
Current non-functional list
These are the functions that are not supported. Assuming that a function is not supported is the best approach when using advanced variables. Use of these functions may cause an error message or may silently fail producing invalid ASM.
Functionality explicitly known not to be supported is shown below.
None
❤️
2
Last edit: Anobium 2024-03-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// Test program#scriptPi=22/7#endscriptDimmyCircumference,myRadiusasSingleDimmyDiameterasSingleAliasmyCircumference_E,myCircumference_U,myCircumference_H,myCircumferenceHserPrintCRLFmyRadius=9.5HSerPrintStringCRLF"myRadius = "+ltrim(SingleToString(myRadius))myCircumference=myRadius*Pi*2HSerPrintStringCRLF"myCircumference = "+ltrim(SingleToString(myCircumference))IfmyRadius>10.5ThenHSerPrintStringCRLF"myRadius greater than 10.5"ElseIfmyRadius=10.5ThenHSerPrintStringCRLF"myRadius equals 10.5"ElseIfmyRadius<10.5ThenHSerPrintStringCRLF"myRadius less than 10.5"ThenEndifmyDiameter=myCircumference/PiHSerPrintStringCRLF"myDiameter = "+ltrim(SingleToString(myDiameter))End
Yields the correct results.
**
myRadius = 9.50000000
myCircumference = 59.71428298
myRadius less than 10.5
myDiameter = 19.00000000
**
A demo video is here:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use of float variable(s) as global variables.
Dimensioning of single variable type in user program.
Assigning advanced variables creation of values from constants.
Assigning advanced variables creation of values from singles and constants using addition and subtraction.
Multiplication and division of single variable type
Assigning single to long and long to single.
The assignment of a single or a double to a long also deals with byte and word.
Assigning unit value of a single or double variable to a long variable.
Int() for Single varaibles
Copying between variables of the same type (single to single).
Setting of advanced variable bits.
Addition and subtraction of advanced variables.
Boolean operators of advanced variables.
Functions and sub routines supported including passing float variable(s) as parameters to methods ( sub, function and macro)
Extraction of unit and/or mantissa value to string
SingleToHEX() HEX string of the single
SingleToString() string of the single
SingletoString
Conditional statements
Calculation of the modulo of a Single variable
Dimensioning of longInt, ulongInt and double variable types in libraries.
Assigning double to long and long to double
Assigning a single to double and double to single
Rotate of double, longInt & ulongInt advanced variables.
Negate for advanced variables.
See Video not available
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Evan,
Thanks for all the work you and the rest of the team have done on this. Will this be available in an update soon? Will examples be available to test? Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This has been a huge amount of work by Clint, Jim and myself. It it not for those guys I was not motivated to spend the huge amount of time on making it all work.
Thanks goes to Hugh for the foundation work, the guys that kicked the tyres in 2021 ( they identified all the issue!) and now Jim and Clint.
Angel will release to the DEV Channel build 1358 very soon.
The stable and fully functional build is 1358.
We have two items of additional functionality to add but 1358 is pretty close to completed.
❤️
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
An example is this complex program. It shows using a script to calculate a complex constant that has many decimal points, assignment, maths, conditional test, timer with overflow interrupt and the ISR, and serial interface.
The updated GCBASIC toolchain could be released to the general GCSTUDIO channel by Angel in the coming days.
Clint, Jim and I have completed a huge project to build upon the work of Hugh to provide as robust solution for floating point numbers support. The more we learn about the compiler each time we do some heavy development the more we learn of the amazing compiler that Hugh as youngling wrote. TRULY AMAZING.
From my point of view as the Chief Engineer for this project.
The changes, whilst huge, are limited to users who use the advanced variables. Therefore, the risk is low of breaking other things. We may have impacted other compiler operations but we have been very careful to constrain and test these changes.
The biggest risk is a function, deep inside the compiler, called ISCONST(). This was updated to improved handling of constants. We have run extensive tests and we have no reported errors from the 1000s of test runs. Any errors reported by ISCONST() routine were identified as actual constant errors ( in the test programs )... which is a good thing. So, this risk is low. However, we will have to manage any impact via the forum.
Where advanced variables functions in the compiler are not supported, we have tried to trap these with error messages. This will stop silent error compilation. An example is AVR support for Singles - the message is.. 'not supported'. There may be places where we need to add more error handling .
The HELP is completed. It may need improvement but it is a start and we wait for feedback.
Regarding post release Support. We work as hard as we can with any support requests via the Forum
Constraints
Only chips with lots of RAM will be supported. See item #2.
If someone wants to improve the new routines to reduce RAM usage etc then please do. We can help with regression testing but I am certain folks can improve our work.
If someone wants DOUBLE support in the user program then they can write any supporting functions. We have focused on providing Single support in the user program. All variable types can be used in libraries or included file. You will may hit issues, so, fix them and let us know.
If someone wants AVR support then they can do it. Multi/Divide/Compare in ASM is needed. The compiler is ready for the ASM.
The demos are there and folks should use them and learn from them.
As always, enjoy... this mega release.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
New Update with floats beta is available on DEV channel.
Tool Chain Build: 1368
Version: 1.01.09
This is the candidate to become 1.01.09 on mainstream and other channels in a few days, so please provide feedback if any bug is found before the release to the stable channel.
Angel
Last edit: Angel Mier 2024-03-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you open the Preferences Editor, then select the Compiler tab, you will set a new setting.
I have do so folks know they turned on a new capability.
Heads up - we have a new Compiler and String.h - you WILL need these. Also, we are still testing and we know there are issues, so,please ONLY try to used 18FxxK22 or 18FxxK42 other chips seems to have an error in the conditional test routines ( all ASM ).
If you want to proceed then I will post the new files for you to download.
Last edit: Anobium 2024-03-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
News 23.03.2024
We are testing and testing. Testing will take days.
There is nothing to be added in terms of functionality.
Quick link to current status
https://sourceforge.net/p/gcbasic/discussion/579125/thread/e777a80dfa/?limit=25#9b84
Download
See here https://sourceforge.net/p/gcbasic/discussion/579125/thread/e777a80dfa/?limit=25#e93a
Last edit: Anobium 2024-03-23
I have limited time, but I can carve out a little if you need someone to test.
Good to hear.
We are producing test programs. Once we have the basics running on our tests rigs we can get help to test in the real world. The first goal is to get Singles working, we already have made compiler changes and we have basic maths working to show Single float values on the terminal.. mySingle = 4.321 actually shows up on a serial terminal... this means ram representation and some basic maths convert the Single into Integers for display.
Once we have a version ready will publish to the Dev Channel on GCSTUDIO
Look an update on our progress.
We, Clint, Jim and I are making progress.
We have something that we could share with the constraints we are aware of.
We are focusing on float support adding the minimum functions needed for singles would be +, -. *, /, SingleToString() (so it could be displayed) and SingleToHex()
SingletoString function supports +/-999999.99999999 this is good enough for a utility function. We have another 3 decimal routine that shows how to extract the integer and decimal components.
We have resolved many, many issues and there are many to be resolved.
See this video for an insight into the progress.
Want to play ? The more folks testing the better.
Current functional list
Advanced variables are only supported by a subset of the functions of GCBASIC - you may need to write your own functions, if you need them. :-)
If the function is NOT shown below assume the function is NOT supported. If you use a function that is not shown below then you may get a silent failure and you may not get the results you expected.
The functional characteristics are:
Current non-functional list
These are the functions that are not supported. Assuming that a function is not supported is the best approach when using advanced variables. Use of these functions may cause an error message or may silently fail producing invalid ASM.
Functionality explicitly known not to be supported is shown below.
None
Last edit: Anobium 2024-03-23
Update with floats beta is available on DEV channel.
Tool Chain Build: 1348
Version: 1.01.08.3
Just select the DEV channel to get it.
If for some reason you want to go back to the Stable Release, simply select mainstream channel and apply a Force Update.
Enjoy and give feedback to the team!
Angel
Build #1350 has changes to the numeric variable to String function to align with Single variable type operations.
See https://sourceforge.net/p/gcbasic/discussion/579125/thread/4593ac12bc/?limit=250#1a25 for full details.
Single multiply works!!
The following test program shows Single * Single and Single * Constant.
Yields this on the terminal
**Initial = 3.14285707
Initial = 0x40492492
Result = 36.14285278
Result = 0x42109248
Result = 36.14285278
Result = 0x42109248
MyLong = 36
**
Last edit: Anobium 2024-03-06
Single divide now works!!
Yields the correct results.
**
myRadius = 9.50000000
myCircumference = 59.71428298
myRadius less than 10.5
myDiameter = 19.00000000
**
A demo video is here:
The functional characteristics are:
Use of float variable(s) as global variables.
Dimensioning of single variable type in user program.
Assigning advanced variables creation of values from constants.
Assigning advanced variables creation of values from singles and constants using addition and subtraction.
Multiplication and division of single variable type
Assigning single to long and long to single.
The assignment of a single or a double to a long also deals with byte and word.
Assigning unit value of a single or double variable to a long variable.
Int() for Single varaibles
Copying between variables of the same type (single to single).
Setting of advanced variable bits.
Addition and subtraction of advanced variables.
Boolean operators of advanced variables.
Functions and sub routines supported including passing float variable(s) as parameters to methods ( sub, function and macro)
Extraction of unit and/or mantissa value to string
SingleToHEX() HEX string of the single
SingleToString() string of the single
SingletoString
Conditional statements
Calculation of the modulo of a Single variable
Dimensioning of longInt, ulongInt and double variable types in libraries.
Assigning double to long and long to double
Assigning a single to double and double to single
Rotate of double, longInt & ulongInt advanced variables.
Negate for advanced variables.
See Video not available
Evan,
Thanks for all the work you and the rest of the team have done on this. Will this be available in an update soon? Will examples be available to test? Thanks.
Thank you!
This has been a huge amount of work by Clint, Jim and myself. It it not for those guys I was not motivated to spend the huge amount of time on making it all work.
Thanks goes to Hugh for the foundation work, the guys that kicked the tyres in 2021 ( they identified all the issue!) and now Jim and Clint.
Angel will release to the DEV Channel build 1358 very soon.
The stable and fully functional build is 1358.
We have two items of additional functionality to add but 1358 is pretty close to completed.
New Update with floats beta is available on DEV channel.
Tool Chain Build: 1364
Version: 1.01.08.4
Keep the great work!
Angel
Last edit: Angel Mier 2024-03-10
And, here are many, many programs that show what you can do with the new advanced variable.
See https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/AdvancedVariableSolutions/SingleVariableType_Solutions
An example is this complex program. It shows using a script to calculate a complex constant that has many decimal points, assignment, maths, conditional test, timer with overflow interrupt and the ISR, and serial interface.
Enjoy
A new demo video is here
Remember to like the Video, subscribe and let the video run the the end.
This shows the capabilities, lots of demos and easy to use.
When is the official release of the compiler?
A few days. You can get yesterdays build via the GCSTDIO DEV Channel.
We have one function to complete and a little utility to complete. All the Help etc is all done.
A demonstration of porting an existing LCD program to use a Single variable.
This changes the LCD display from a range of 0 to 1023 ... to 0v0 to 5v0 and more.. see the video.
See the short video here
Really simple, enjoy
Here is the source, and the changes to support using a Single variable in the LCD volt meter video, see https://sourceforge.net/p/gcbasic/discussion/579125/thread/e777a80dfa/?limit=250#02cf
I defined a Single variable, assigned the ADC result to the single variable, did the maths and converted the SingleToString for display on the LCD.
Enjoy
The updated GCBASIC toolchain could be released to the general GCSTUDIO channel by Angel in the coming days.
Clint, Jim and I have completed a huge project to build upon the work of Hugh to provide as robust solution for floating point numbers support. The more we learn about the compiler each time we do some heavy development the more we learn of the amazing compiler that Hugh as youngling wrote. TRULY AMAZING.
From my point of view as the Chief Engineer for this project.
The changes, whilst huge, are limited to users who use the advanced variables. Therefore, the risk is low of breaking other things. We may have impacted other compiler operations but we have been very careful to constrain and test these changes.
The biggest risk is a function, deep inside the compiler, called ISCONST(). This was updated to improved handling of constants. We have run extensive tests and we have no reported errors from the 1000s of test runs. Any errors reported by ISCONST() routine were identified as actual constant errors ( in the test programs )... which is a good thing. So, this risk is low. However, we will have to manage any impact via the forum.
Where advanced variables functions in the compiler are not supported, we have tried to trap these with error messages. This will stop silent error compilation. An example is AVR support for Singles - the message is.. 'not supported'. There may be places where we need to add more error handling .
The HELP is completed. It may need improvement but it is a start and we wait for feedback.
Regarding post release Support. We work as hard as we can with any support requests via the Forum
Constraints
As always, enjoy... this mega release.
New Update with floats beta is available on DEV channel.
Tool Chain Build: 1368
Version: 1.01.09
This is the candidate to become 1.01.09 on mainstream and other channels in a few days, so please provide feedback if any bug is found before the release to the stable channel.
Angel
Last edit: Angel Mier 2024-03-17
I get an error invalid variable type: SINGLE ? I have updated to to build 1368.
I'am a new to gcbasic so i must be doing something wrong :-))
If you open the Preferences Editor, then select the Compiler tab, you will set a new setting.
I have do so folks know they turned on a new capability.
Heads up - we have a new Compiler and String.h - you WILL need these. Also, we are still testing and we know there are issues, so,please ONLY try to used 18FxxK22 or 18FxxK42 other chips seems to have an error in the conditional test routines ( all ASM ).
If you want to proceed then I will post the new files for you to download.
Last edit: Anobium 2024-03-17
Found it, thank you :-)
Testing ... testing will take many days. approx 12 days for range we have selected
Huge thanks should go to Jim and Clint.
See this video for an insight into the testing progress.