GOTO another function while in a function

Hey guys,

Can I goto another function within a function than return back to the main function. Or does the program already function this way? I normally would have tested this already but I have been out and about today.

Function go()
A=b+c
Goto “@add()”
Do something else
Endfn

Function add()
A=a+1
Endfn

Hey Lucas,

I think that generally with GOTO, it needs to stay in the same function to get it to work.

I think with what you have above though, you could get away with doing an onchange for A and then have it run the add function

That makes sense, thanks Tim. I ended up doing a different rout for this anyways, the timer you helped me with was not very accurate so I made a series of timestamps to use the date$ rip it apart then give me time on in min. I was going to post it up on here but I was not sure if it would be helpful or not.

I gotcha,

I was wondering if that timer might run into issues just because of how often it might be triggering, but if you’re able to get it from grabbing the time in the internal clock that’s a good idea. We’d appreciate it if you’d send us the code you wrote for it though so we can share this solution with others :slight_smile:

time stamp.txt (2.9 KB)

There is my code @Tim_hms it should work still, or be easy enough to get working, I am using this to monitor 4 inputs throughout each day and log to different files. I did take parts of my code out, and all my tags are set to RET.

1 Like