What about the character #?
21 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I wonder if anyone have an idea about the character #. It appears to have no use in matlab and it can neither be used in variable names,
#a = 0; %ERROR!
b.#c = 0; %ERROR!
So, does it have some use that I have still to identify, is it excluded for a reason, ... I am simply curious, what is the thing with the hash?
0 件のコメント
採用された回答
Thorsten
2015 年 3 月 27 日
編集済み: Thorsten
2015 年 3 月 27 日
There is no special thing with the hash. In some script languages it is used as the comment character, and I've seen things like
%# my comment here
You have to use alphanumeric characters for variables, functions etc, and they must not start with a number. Like #, you cannot use $, !, § etc.
So in principle Mathworks could have decided to allow #, but probably because it is not allowed in variable or function names in all programming languages that I know, they decided the same for Matlab.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Language Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!