fastbasic icon indicating copy to clipboard operation
fastbasic copied to clipboard

Support for TRAP statement

Open bsturk opened this issue 1 year ago • 2 comments

Would be nice to have this.

bsturk avatar Mar 07 '24 16:03 bsturk

Is there a way to emulate this in FastBASIC? I'm porting some code and it isn't behaving the same due to the missing TRAP functionality.

bsturk avatar Jan 07 '25 23:01 bsturk

Hi!

FastBasic does not have a TRAP statement because it has a different model for how to react to errors.

You should use the ERR() function after each I/O operation (or other statement that can generate an error) and react accordingly.

If you want to post a code snippet I can help you convert to the FastBasic way.

Have Fun!

dmsc avatar Jan 08 '25 01:01 dmsc