Returning a value from a Function
Blitz3D Forums/Blitz3D Beginners Area/Returning a value from a Function
| ||
Hmmm - slight problem here. I run this function and the result i get is the hour - 1 chacrater :( datetime$=Show_Time() Function Show_Time() date$ = Left(CurrentTime$(),5)+"/"+CurrentDate$() Return date End Function Can someone show me what i'm doing wrong. Many thanks. |
| ||
Hmm, your Show_Time function doesn't have a $. Show_Time() or Show_Time%() returns an integer Show_Time#() returns a float Show_Time$() returns a string So, returning date$ is only returning the first integer part of your string (in other words, the hour). |
| ||
Erm...datetime$ = Show_Time$() Function Show_Time$() ;Might be that you need to let Blitz know the return type ;(#,%,$) when declareing a function...else it just dumps an ;integer in there date$ = Left(CurrentTime$(),5)+"/"+CurrentDate$() Return date End Function |
| ||
Opps...to slow :P |