A function can only return 1 value. You could mask all three values in a string, and then separate them out later:
vertices$=str$(x)+":"+str$(y)+":"+str$(z)
I put the colon in there as a marker for when you want to separate the values later.
A little more "C like" way to return three or more values (even of varying data types) would be to use a memblock - kinda like a structure.
cls
Input "Enter X value :";x#
Input "Enter Y value :";y#
Input "Enter Z value :";z#
make_smoke(x#,y#,z#)
rem --- get our info out of the memblock
text 0,100,"Memblock x value is :"+str$(memblock float(1,0))
text 0,120,"Memblock y value is :"+str$(memblock float(1,4))
text 0,140,"Memblock z value is :"+str$(memblock float(1,8))
suspend for key
end
function make_smoke(x#,y#,z#)
rem ----- let's make a memblock to store 3 floats -----
rem ----- we'll check to see if memblock 1 exists,-----
rem ----- if not, we'll create it ---------------------
if memblock exist(1)=0
rem --- a float value has 4 bytes so we need 12 bytes
make memblock 1,12
endif
rem --- the first float starts at position 0
rem --- the second float position 4
rem --- the third float position 8
write memblock float 1,0,x#
write memblock float 1,4,y#
write memblock float 1,8,z#
rem --- That's it!!
rem --- because it's a memblock, we don't really have to set
rem --- a return value... We just reference Memblock 1 in the program
endfunction
It looks longer that it actually is because of all the comments I put in - but it's a very easy method to use.
Enjoy your day.