Quote from: Techno on November 09, 2013, 02:55:05 AM
1) What is the default return value in a procedure when there is no data type or pointer defined?.
If you don't declare a return type and value then there is none.
Quote from: Techno on November 09, 2013, 02:55:05 AM
2) Can I return a pointer as a return value, and how do you do that?.
You can return any type you want once you declare it.
sub myproc1(), int
INT x
x=4
return x
endsub
sub myproc2(), string
string x
x="hello"
return x
endsub
sub myproc3(), pointer
pointer x
x= some memory location
return x
endsubQuote from: Techno on November 09, 2013, 02:55:05 AM
3) What is an ASCII string in Terminal Zero IWBasic?
I'm not sure what you are asking.
In IWBasic this is an ASCII string - "abcd"
In memory it would take up 5 memory locations with the last being 0x00.
All IWBasic strings are terminated with a NULL character internally. That's why we don't have to ever say how long a string is when we pass it to a function. In some C type library functions we usually have to tell it how long a string is because strings aren't always null terminated.