Error while Scilab module is loading

痞子三分冷 提交于 2019-12-02 10:46:36

问题


I downloaded module Metanet 0.6.2 and ran by Scilab

atomsInstall

After that i ran

`atomsLoad('metanet')` 

but it shows

atomsLoad: An error occurred while loading 'metanet-0.6.2': error(msprintf(gettext('%s module required."),'graph')); ^^

Error: Heterogeneous string detected, starting with ' and ending with ". at line 335 of function atomsLoad ( D:\Program Files\scilab-6.0.1\modules\atoms\macros\atomsLoad.sci line 351 )

Why did it happen so?


回答1:


It turns out that the metanet module is not supported by Scilab 6.0.1 yet. I had to install version 5.5.2.




回答2:


Unfortunately both the question and the accepted answer here in this page are very vague and misleading. Ideally these kind of posts should be blocked / down-voted, but I will try to answer it as much as i can.

Firstly when you want to run a Scilab command you do not put it in quotation marks, unless you want to use execstr command. However the characters you have used are not quotations but backticks! I'm not sure why you have done that.

Secondly, the error:

Error: Heterogeneous string detected, starting with ' and ending with "

happens when double quotation is sued inside the single quotation or vise versa:

"This is a' string"
'this is a" string'

to solve the issue you should change the above strings to

"This is a'' string"
'this is a'" string'

basically adding one single quotation before any of the ' and " characters to turn them into literal ' and ".

bonus point if you want to pass a string to Tcl use curly brackets

TCL_EvalStr("set myVar {Hello World!}")

or

TCL_EvalStr("set myVar '"Hello World!'"")

but for PowerShell

powershell('$myVar= ''Hello World!''')

or

powershell("$myVar= ''Hello World!''")


来源:https://stackoverflow.com/questions/50200790/error-while-scilab-module-is-loading

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!