hi,
see this code:
function :
input:num(numericSeries);
if num=4 then begin
print("input not correct");
break;
.......
.......
end;
it's not possibile to use break to exit function, it give me error
what can i use to exit function?
exit function with error
- rrams
- Posts: 128
- Joined: 10 Feb 2011
- Location: USA
- Has thanked: 7 times
- Been thanked: 70 times
- Contact:
Re: exit function with error
Hello,
If you just want the function to exit without an error, you use the PowerLanguage keyword:
If you want the function to abort with an error message you use the PowerLanguage keyword:
If you just want the function to exit without an error, you use the PowerLanguage keyword:
Code: Select all
#return;
Code: Select all
RaiseRunTimeError("Message");
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: exit function with error
Hello turbofib,
The correct code would be:
You may also want to check out ‘RaiseRunTimeError’ or ‘Abort’.
The correct code would be:
Code: Select all
input:num(numericSeries);
if num=4 then begin
print("input not correct a");
#return;
end;
print("input is correct");