Hi Melanie,
usefull!!
Tnk you very much!!!!!!!
Roberto
Hi Melanie,
usefull!!
Tnk you very much!!!!!!!
Roberto
Like this ?
Code:array var word [5] C var byte Temp Var word for c = 0 to 5 Temp = array[C] if temp.highbyte = 0 then gosub Compute next c
Last edited by sayzer; - 14th September 2006 at 13:13.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Or maybe
another method...Code:array var word [5] C var byte for c = 0 to 5 if (array[C]>>8) = 0 then gosub Compute next end Compute: 'Do something return
Code:array var word [5] C var byte for c = 0 to 5 if array[C]<=$00FF then gosub Compute next end Compute: 'Do something return
Last edited by mister_e; - 14th September 2006 at 15:13.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Roberto, Sayzer and Steve
Me thinks you will avoid much trouble if the array has 6 elements, or the FOR...NEXT counts from 0 to 4.
Steve B
LMAO! ssshhhhhhut!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I know that Steve sleeps only a few hrs from late morning to later morning.
Just like I do.
Don't know about Roberto's.
--------------------
Last edited by sayzer; - 15th September 2006 at 15:17.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi guys,
thank you for the support.
I tested all of your suggestion.
the Sayzer solution require 34 bytes,
the 1st Mister_e solution require 83 bytes,
the 2nd solution require 66 bytes.
the Melanie idea for solution:
---------------
array var word [5]
C var byte
for c = 1 to 9 step 2
if array.lowbyte(c) = 0 then gosub Compute
next
end
Compute:
'Do something
return
------------------
require 35 bytes.
The winner is:......... Sayzer.
bye
Roberto
Bookmarks