Does anyone know or know where I can find how, if even possible, to determine the calling program and line number from within a function? It is a royal pain to have to always remember to pass the same parameters when FP should be able to do it automatically.
This occurs in my main on-the-fly debugging routine, which I constantly move & change when I am debugging a program. Can easily be typed in a dozen or more times per day. Due to other changes it is usually easier to type than to cut & paste.
A side advantage would be that I could pass 2 extra parameters when needed, which is rare.
Currently doing this:
= myfunction(prog(), line(), 1st var, ... , Nth var)
FUNCTION myfunction
PARAMETERS varP, varL, var1, ..., varN
prog = varP
line = varL
...
RETURN
Want to do this:
= myfunction(1st var, ... , Nth var)
FUNCTION myfunction
PARAMETERS var1, ..., varN
prog = (calling program name)
line = (calling program line number)
...
RETURN
Using FP 2.6.
Thanks in advance.
This occurs in my main on-the-fly debugging routine, which I constantly move & change when I am debugging a program. Can easily be typed in a dozen or more times per day. Due to other changes it is usually easier to type than to cut & paste.
A side advantage would be that I could pass 2 extra parameters when needed, which is rare.
Currently doing this:
= myfunction(prog(), line(), 1st var, ... , Nth var)
FUNCTION myfunction
PARAMETERS varP, varL, var1, ..., varN
prog = varP
line = varL
...
RETURN
Want to do this:
= myfunction(1st var, ... , Nth var)
FUNCTION myfunction
PARAMETERS var1, ..., varN
prog = (calling program name)
line = (calling program line number)
...
RETURN
Using FP 2.6.
Thanks in advance.