Opened 7 years ago

Closed 7 years ago

#4770 closed defect (worksforme)

OMShell doese not accept backslah in parameter-string as shown in tutorial

Reported by: jrgrauh@… Owned by: somebody
Priority: high Milestone: Future
Component: *unknown* Version: v1.13.0-dev-nightly
Keywords: passing parameter format Cc:

Description

Release v1.13.0-dev-677-ga57fe0c

Tutorial line:

writeFile("sim_BouncingBall.mos", "

loadFile(getInstallationDirectoryPath() + \"/share/doc/omc/testmodels/
˓ →BouncingBall.mo\");

Response of OMShell:

writeFile("sim_BouncingBall.mos", "

loadFile(getInstallationDirectoryPath() + \"/share/doc/omc/testmodels/
˓ →BouncingBall.mo\")
Error occurred building AST
Syntax Error
[<interactive>:3:25-3:25:writable] Error: Lexer got '"
loadFile(getInstal' but failed to recognize the rest: '<EOF>'

Change History (3)

comment:1 Changed 7 years ago by jrgrauh@…

Dear Supporter,

sorry to bother you with nitty-gritty stuff.
If I knew, where to read up on how to pass
parameters and when and where backslash is
a must, I could go forward.

Thank you for your efforts!

Best regards

Joerg

comment:2 Changed 7 years ago by perost

Which tutorial is this? "); is missing at the end, the command should be:

writeFile("sim_BouncingBall.mos",
  "loadFile(getInstallationDirectoryPath() + \"/share/doc/omc/testmodels/BouncingBall.mo\");");

comment:3 Changed 7 years ago by perost

  • Resolution set to worksforme
  • Status changed from new to closed

Closing this one due to lack of feedback, and the documentation I can find that includes this example is correct.

Note: See TracTickets for help on using tickets.