Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 可以在Visual Studio代码中保存变量吗?_Variables_Visual Studio Code_Workspace - Fatal编程技术网

Variables 可以在Visual Studio代码中保存变量吗?

Variables 可以在Visual Studio代码中保存变量吗?,variables,visual-studio-code,workspace,Variables,Visual Studio Code,Workspace,我试图自学如何在工作中的停机时间编写代码/自动执行某些任务,而它为我安装的使用python的IDE是VSCode,我似乎并不完全理解 我唯一的正规编码教育是使用matlab。我记得我能够在代码中定义一个变量或函数,运行它,然后在终端中调用同一个变量/函数,这将返回我定义的内容。还有一个工作区目录,其中显示了我存储的所有变量。然而,如果是VSCode,我找不到类似的东西-我甚至不得不安装一个单独的包来运行我的代码。有可能让VSCode实现我在matlab中描述的功能吗?安装VSC是一个漫长的过程,

我试图自学如何在工作中的停机时间编写代码/自动执行某些任务,而它为我安装的使用python的IDE是VSCode,我似乎并不完全理解

我唯一的正规编码教育是使用matlab。我记得我能够在代码中定义一个变量或函数,运行它,然后在终端中调用同一个变量/函数,这将返回我定义的内容。还有一个工作区目录,其中显示了我存储的所有变量。然而,如果是VSCode,我找不到类似的东西-我甚至不得不安装一个单独的包来运行我的代码。有可能让VSCode实现我在matlab中描述的功能吗?安装VSC是一个漫长的过程,所以我真的不想尝试获得一个新的解释器,除非我必须这样做。如果在matlab和VSC中有一些我没有掌握的显著差异,我会非常感激,如果可以解释的话,因为我现在感到非常困惑

testVar = 8
我希望能够在终端中键入
testVar
,并让它返回
8
,但是:

testVar : The term 'testVar' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify 
that the path is correct and try again.
At line:1 char:1
+ testVar
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (testVar:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

你要找的词是REPL。您在matlab中使用了REPL。在命令行/终端类型
python
python3
上,您可以找到python的REPL,您要查找的单词是REPL。您在matlab中使用了REPL。在命令行/终端类型
python
python3
上,您可以找到python的REPL