Opened 5 years ago
Closed 5 years ago
#6253 closed defect (invalid)
Error processing assert
| Reported by: | Philip Hannebohm | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.16.1 | 
| Component: | *unknown* | Version: | 1.16.0 | 
| Keywords: | assert, loadString | Cc: | 
Description
When I run the following X.mos script
loadString("
model X
equation
  assert(time < 1, "text");
end X;
"); getErrorString();
I get the error message
...X.mos:4:25-4:25:writable] Error: Missing token: EQUALS
However loading a separate .mo file with model X works.
  Note:
 See   TracTickets
 for help on using tickets.
    
It is probably the quote on the string "text". You have to escape it since the whole thing is supposed to be one big string. Try \"text\".