Yo he buscado en la ayuda de GCB si hay alguna instrucción para convertir una variable en punto flotante a
una cadena pero no la he encontrado.
he intentado
cadena = str32(1234.5678)
y cuando imprimo cadena el resultado es "RÜD1234"
existe otra manera ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I wanted floats then strings would be a solution. I'm just mulling how to do it.
I'd need to get the value before the decimal point then the value after. It would be either difficult or easy depending on ones knowledge of maths.
I can live without floats. They would make converting arduino code easier as using pi is common.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the use of the term "reals" to exclusively mean decimal or floating point numbers is confusing. Integers are also "real" numbers as are fractions.
It may be less confusing to say that:
"Great Cow Basic does not support floating point mathematics at this time".
Bill
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Lots of commands I'm unfamiliar with.
I'm not good at maths, mantissa, exponent yawn.
I do sums in my head but not the way I learnt in school... no pen & paper.
I've seen youtube vids about quick +-*/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The zxpectrum used floats as default even if you used whole numbers, probably why it was slow basic.
Why not rip off arduino floats?
I posted a pseudo decimal point and I used string functions. 5V meter
I think using strings to represent floats would be the way but needs some thought to implement and maths know how. It all ends up with rotating stuff and strings can be rotated easy but that idea won't work.
Floats are an interesting idea but can we live without it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yo he buscado en la ayuda de GCB si hay alguna instrucción para convertir una variable en punto flotante a
una cadena pero no la he encontrado.
he intentado
cadena = str32(1234.5678)
y cuando imprimo cadena el resultado es "RÜD1234"
existe otra manera ?
I posted. Do not use reals. See https://sourceforge.net/p/gcbasic/discussion/596084/thread/b867317011/
I posted an example of how to do this with a long.
If I wanted floats then strings would be a solution. I'm just mulling how to do it.
I'd need to get the value before the decimal point then the value after. It would be either difficult or easy depending on ones knowledge of maths.
I can live without floats. They would make converting arduino code easier as using pi is common.
dim display_string as String * 4
dim valor_calc as Long
valor_calc = 99989991 'treat xxxx.yyyy
do
loop
I think the use of the term "reals" to exclusively mean decimal or floating point numbers is confusing. Integers are also "real" numbers as are fractions.
It may be less confusing to say that:
"Great Cow Basic does not support floating point mathematics at this time".
Bill
Agree, my err to use 'real'. See https://sourceforge.net/p/gcbasic/discussion/596084/thread/b867317011/
Lots of commands I'm unfamiliar with.
I'm not good at maths, mantissa, exponent yawn.
I do sums in my head but not the way I learnt in school... no pen & paper.
I've seen youtube vids about quick +-*/
The zxpectrum used floats as default even if you used whole numbers, probably why it was slow basic.
Why not rip off arduino floats?
I posted a pseudo decimal point and I used string functions. 5V meter
Great stuff.
I think using strings to represent floats would be the way but needs some thought to implement and maths know how. It all ends up with rotating stuff and strings can be rotated easy but that idea won't work.
Floats are an interesting idea but can we live without it?