Chat freely about anything...

User avatar
By Davidpurola
#39898 This is the simple code that does NOT work. I have written in basic for 40+ years and I don't understand...

memclear
counter = 0
timesetup(-5,0)
delay 1000
timer 1000 [incsec]
wait
'
[incsec]
counter = counter + 1
if counter = 60 then gosub [gettime]
wait
'
[gettime]
counter = 0
bla = time()
hh = mid(bla,12,2) 'hour
mm = mid(bla,15,2) 'min
ss = mid(bla,18,2) 'sec
serialprintln "hour=",hh,"minute=",mm,"seconds=",ss
return

[Exit]
end
User avatar
By Mmiscool
#39900 In this really basic implementation of basic you would have to do each variable or string individually.

Code: Select allserialprint "hour="
serialprint hh
serialprint "minute="
serialprint mm
serialprint "seconds="
serialprintln ss


The output would all be on one line in this case.