Hi all just tried out the new release for the signed integer support. It does not appear to be any different than the 2-11-09 version. Using dim as integer works the same in both releases. I tested the signed math with a first order lag and using the PWM to monitor the results, NO GO. It does not produce the correct calculations for signed math. The serprint 1, command does not work. It sends out a number of characters equal to the value of the data, 0 = 0 out 1= out, 2=2 out etc. This was similar to the problem of the old release printing word variables
Any help? Thanks Ed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all. Upon further testing I have confirmed that the Integer routines appear to be correctly working. I tested this with a first order lag which requires negative number processing. In order to work all variables internal to the calculation must be dim as Integer. Thanks Hugh!
Printing out these values still does not work correctly. If dim as word, the serprint command works fine, not for integer. Word values opens an address for SERPRINTVAL And uses SERPRINT15 to print to the LCD.
Integer opens SysPRINTDATAHandler and uses SERPRINT13 to print values to the LCD display. This command outputs a series of characters equal to the numeric value of the variable, and does not work correctly. This is similar to the problem of using serprint on word variables a while back.
Release 2-11-09 has the Integer routine, but it does not work correctly on the calcualtions.
Any thoughts? Best regards, Ed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Must not have dimensioned all my variables as integers when trying previously, thanks for the tip. Was able to get the add and subtract working but found similar condition on output. I was using the alt soft uart routine and a terminal display. Had to evaluate myvar.15 and if true then print("-") and print (!myvar) (and add one?, I forget), else print(myvar), for proper output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would say that i can't use Cowbasic when signed integer and long integer are not supported. :-(
Also single variables and floating point arithmetic is a must have.
I am familiarised to use it from Bascom and i use it often!
This should work in Cowbasic also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all just tried out the new release for the signed integer support. It does not appear to be any different than the 2-11-09 version. Using dim as integer works the same in both releases. I tested the signed math with a first order lag and using the PWM to monitor the results, NO GO. It does not produce the correct calculations for signed math. The serprint 1, command does not work. It sends out a number of characters equal to the value of the data, 0 = 0 out 1= out, 2=2 out etc. This was similar to the problem of the old release printing word variables
Any help? Thanks Ed.
Hi all. Upon further testing I have confirmed that the Integer routines appear to be correctly working. I tested this with a first order lag which requires negative number processing. In order to work all variables internal to the calculation must be dim as Integer. Thanks Hugh!
Printing out these values still does not work correctly. If dim as word, the serprint command works fine, not for integer. Word values opens an address for SERPRINTVAL And uses SERPRINT15 to print to the LCD.
Integer opens SysPRINTDATAHandler and uses SERPRINT13 to print values to the LCD display. This command outputs a series of characters equal to the numeric value of the variable, and does not work correctly. This is similar to the problem of using serprint on word variables a while back.
Release 2-11-09 has the Integer routine, but it does not work correctly on the calcualtions.
Any thoughts? Best regards, Ed.
Hi Ed,
Good news!! and also a thanks to Hugh, well done.
Must not have dimensioned all my variables as integers when trying previously, thanks for the tip. Was able to get the add and subtract working but found similar condition on output. I was using the alt soft uart routine and a terminal display. Had to evaluate myvar.15 and if true then print("-") and print (!myvar) (and add one?, I forget), else print(myvar), for proper output.
Kent, thanks.
Since the serprint works for words, I have come up with a work around until Hugh gets time to fix this. Similar to yours.
If temp is dim as integer and Display is dim as word, then this will work to display results on serial port:
if Temp.15 = on then
Display = 65536 - temp
else
Display = temp
end if
if Temp.15 = on then
serprint 1, "-"
serprint 1, Display
else
serprint 1, display
end if
Best regards, Ed.
Has anything changed regarding signed integer?
I would say that i can't use Cowbasic when signed integer and long integer are not supported. :-(
Also single variables and floating point arithmetic is a must have.
I am familiarised to use it from Bascom and i use it often!
This should work in Cowbasic also.