Websites Navigation: Airbit | Shop | m-shell.net
Languages: EN | DE

Comments

Normally, all characters in an m script are assumed to be m language. Comments intended for the human reader must therefore be specially marked:

  • Single line comments start with a double slash: any text from a // to the end of the line containing it is considered a comment.
  • Multiline comments start with slash-star and end with star-slash: any text between /* and */ is considered a comment and ignored. These comments can be nested.

print 3*3 // this prints nine
→ 9
/* The following m code is within this comment,
   so it is ignored:
print 5/7
   This is still part of the comment.
   /* This is a nested comment ending here: */
   This is the last line of this comment. */
print 3/4
→ 0.75

Comment marks cannot be placed within string literals (see section * ()).


© 2004-2011 airbit AG, CH-8008 Zürich
Document AB-M-REF-887
mShell Home  > Documentation  > Manuals