简体   繁体   English

如何从Notepad ++文件逐行或逐节运行Octave?

[英]How to run Octave from a Notepad++ file line by line or by sections?

I am looking for a way to have my Notepad++ window open for editing my code and run it line by line or by sections (more than 1 line) while I am editing. 我正在寻找一种方法来打开我的Notepad ++窗口来编辑代码,并在编辑时逐行或按节(多于1行)运行它。 It would be like having a real IDE; 就像拥有一个真正的IDE一样。 the output could be shown in the same window (Notepad++) or directly in the Octave window. 输出可以显示在同一窗口(Notepad ++)中,也可以直接显示在八度窗口中。

I have tried what many many sites say. 我已经尝试了许多网站所说的内容。 That is, writing this: 也就是说,编写此代码:

C:\Software\Octave-3.6.4\bin\Octave\Octave-3.6.5.exe  "$(FULL_CURRENT_PATH)"

in the Run window in Notepad++, saving and giving it a shortcut. 在Notepad ++的“运行”窗口中,保存并为其提供快捷方式。 However, it is still not working. 但是,它仍然无法正常工作。 When I tried to run it, the black window starts showing-up but then it disappears and nothing else happens. 当我尝试运行它时,黑色的窗口开始显示,但随后消失了,没有任何其他反应。 In my Notepad++ window I have only one line (for now) where I have tried just "b=4" or "3*4". 在我的Notepad ++窗口中,目前只有一行,我只尝试了“ b = 4”或“ 3 * 4”。 I have done this with and without semicolon at the end. 我在结束时使用了分号和不使用分号。 Nothing happens. 什么都没发生。

I have Windows 8.0, Notepad 6.5.5 and Octave-3.6.4. 我有Windows 8.0,记事本6.5.5和Octave-3.6.4。 I already change the octaverc file in Octave to make it work with Notepad++. 我已经在Octave中更改了octaverc文件以使其与Notepad ++一起使用。 I have work already only in the command line in Octave and is working fine. 我已经只能在Octave的命令行中工作了,并且工作正常。 The Octave I installed was exactly "octave-3.6.4-vs2010-setup", it says it was compiled for Visual Studio 10. Is that the reason why this is not working? 我安装的Octave恰好是“ octave-3.6.4-vs2010-setup”,它说它是为Visual Studio 10编译的。这是为什么它不起作用的原因吗?

Any help will be appreciated... 任何帮助将不胜感激...

  • regarding Octave not processing the command: use supposed command line outside the N++ and see if it works. 关于Octave不处理命令的问题:在N ++之外使用假定的命令行,看看它是否有效。 If not, find a way to make it working, then transfer it back to N++ (and use the token "$(FULL_CURRENT_PATH)" instead of concrete filename) 如果不是,请找到一种使其工作的方法,然后将其传输回N ++(并使用令牌"$(FULL_CURRENT_PATH)"而不是具体的文件名)

  • regarding running the code in smaller portions: if you app can accept the code directly in the command line (SQL command line tools I use can do this), then you can use token "$(CURRENT_WORD)" what stands for content of current selection ( all tokens are in wiki ) 关于在较小的部分中运行代码:如果您的应用程序可以直接在命令行中接受代码(我使用的SQL命令行工具可以执行此操作),则可以使用标记"$(CURRENT_WORD)"表示当前选择的内容( 所有令牌都在Wiki中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM