Scilab模块加载时出错

问题描述 投票:1回答:2

我下载了模块Metanet 0.6.2并由Scilab运行

atomsInstall

之后我跑了

`atomsLoad('metanet')` 

但它表明

atomsLoad:加载'metanet-0.6.2'时发生错误:error(msprintf(gettext('%s module required。“),'graph')); ^^

错误:检测到异构字符串,以'并以...结尾'在函数atomsLoad的第335行(D:\ Program Files \ scilab-6.0.1 \ modules \ atoms \ macros \ atomsLoad.sci第351行)

为什么会这样?

scilab
2个回答
0
投票

事实证明,Scilab 6.0.1还不支持metanet模块。我不得不安装5.5.2版。


0
投票

不幸的是,本页中的问题和接受的答案都非常模糊和误导。理想情况下,这类帖子应该被阻止/投票,但我会尝试尽可能多地回答它。

首先,当您想要运行Scilab命令时,除非要使用execstr命令,否则不要将其放在引号中。但是你使用的字符不是引用而是反引号!我不知道你为什么这么做。

其次,错误:

错误:检测到异构字符串,以“结束”开头

在单引号内使用双引号时反复出现,反之亦然:

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

要解决此问题,您应该将上述字符串更改为

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

基本上在任何'"字符之前添加一个单引号将它们变成文字'"

奖励点如果你想传递一个字符串到Tcl使用花括号

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

要么

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

但对于PowerShell

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

要么

powershell("$myVar= ''Hello World!''")
© www.soinside.com 2019 - 2024. All rights reserved.