Ok, a sudden deadline of two days is upon me, and I have to now convert and do big changes to my old QB3.5 survey software. Glad I've had the PB3.5 manuals in paper in the bathroom for the last two years, and have read them several times through. Let's see if anything stuck 
Speed is fairly important in several parts of my program. I need to keep up with a couple of realtime serial data streams. So I have been coding, with a mind to those pesky little details like implied conversions and efficient data types. So here's the question:
Does PB3.5 optimize numeric contstants at compile time to prevent implied conversions? I am trying to write strongly typed code, and would like to know if I am being anal-retentive. Below is an example. Notice the stuff like 1%, 3%, etc. This is intended to avoid a conversion from byte (unsigned) to integer (signed). would the compiler take care of that anyways? Am I just wasting my time?
------------------
What can go wrong will go wrong.
Anything can go wrong.
What hasn't?!?!

Speed is fairly important in several parts of my program. I need to keep up with a couple of realtime serial data streams. So I have been coding, with a mind to those pesky little details like implied conversions and efficient data types. So here's the question:
Does PB3.5 optimize numeric contstants at compile time to prevent implied conversions? I am trying to write strongly typed code, and would like to know if I am being anal-retentive. Below is an example. Notice the stuff like 1%, 3%, etc. This is intended to avoid a conversion from byte (unsigned) to integer (signed). would the compiler take care of that anyways? Am I just wasting my time?
Code:
for cc% = 1% to ln% n%=ascii(mid$(n$, cc%, 1%)) select case n% case 48% to 57% ' "0" thru "9" p% = n%-48% : col% = col% + 4% case 45% ' "-" p% = 10% : col% = col% + 4% case 46% ' "." p% = 11% : col% = col% + 3% case 69%, 101% ' "E" or "e" p% = 12% : col% = col% + 4% case 43% ' "+" p% = 13% : col% = col% + 4% case 32% ' space p% = 14% : col% = col% + 4% case else ' anything else does a thin underscore p% = 15% : col% = col% + 4% end select for rc% = 0% to 4% locate (row% + rc%), col% print mid$(p$(p%), 1% + (rc% * 3%), 3%); next rc% if n% = 46% then col% = col% - 1% next cc%
------------------
What can go wrong will go wrong.
Anything can go wrong.
What hasn't?!?!
Comment