Functions!? Passing back and forth

Started by Baggey, October 26, 2024, 18:21:41

Previous topic - Next topic

Baggey

Recently ive discovered that when using Said Method or Function

It's better to pass the data back in the format you want but when it comes in have it as "int"

I not sure wether this is a bug or what your supposed to do anyway's ::)

It stops random things happening with your passed Data?

Baggey
Running a PC that just Aint fast enough!? i7 4Ghz Quad core 32GB ram  2x1TB SSD and NVIDIA Quadro K1200 on Acer 24" . DID Technology stop! Or have we been assimulated!

Windows10, Parrot OS, Raspberry Pi Black Edition! , ZX Spectrum 48k, C64, Enterprise 128K, The SID chip. Im Misunderstood!

Midimaster

Give a short code example, so we can see what you did!

If you mean return values with RETURN command... here the TYPE depends on the definition you made in the function's header:

Function GiveAText:String()
   Return 3
End Function

would return a STRING "3"

Function GiveAFloat(A:Double)
   Return A
End Function

would return an INTEGER because you forgot to define the return type.

So you alway have to declare the type a function will return

Is it that, what you mean?
...back from North Pole.