本文介绍了评论的%和%%有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
MATLAB编辑器自动突出显示 %%
注释后的所有内容,以及 %%
变为粗体。但这里的本质区别是什么?为什么人们有时使用 %%
而不是%
?
在Matlab编辑器中,Matlab解析 %%
分隔的块作为部分,您可以将其作为单位运行,而与运行整个脚本无关。
The MATLAB editor automatically highlights all content after %%
comments, and text after %%
in the same line are turned bold. But what's the essential difference here? Why do people sometimes use %%
instead of %
?
解决方案
From a syntax point of view, they are both comments.
In the Matlab editor, Matlab parses %%
delimited blocks as "sections" which you can run as a unit independent of running the whole script.
这篇关于评论的%和%%有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!