[Solved] BASIC runtime error; Argument is not optional
Posted: Sun Mar 06, 2022 4:59 pm
I have the following function to translate a number (1... 26) into a character "A"..."Z"
it generates the runtime error with the arrow on the line with: test=s(n)
I am missing something (beginner).
BTW is any calc-function usable in Basic?
Code: Select all
function test(n as integer) as string
dim s(26) as string
s(0)=" "
s(1)="A"
s(2)="B"
' etc.
s(25)="C"
s(26)="Z"
test = s(n)
end function
I am missing something (beginner).
BTW is any calc-function usable in Basic?