JM°-Classic / Einstieg / Comments


Comments

Kommentare sind Bereiche oder Zeilen, die vom JM°-Parser ignoriert werden. Dies eignet sich z.B. für Notizen und Anmerkungen.

JM° supports 3 types of comments:

Line comment: #
Block comment: /* */
Skript-Ende: #**#

Line comment

Line comments are introduced with a hash character.

# Dies ist eine Notiz
Print 5  # Dies hier wird ebenso ignoriert

This can be used to add notes or exclude lines from processing.

Block comment

A block comment is introduced with and cancelled with .

Print 1
Print 2
/*
Print 3
Print 4
*/
Print 5

In diesem Beispiel werden nur 1,2 und 5 ausgegeben.

Ein Block-Kommentar kann auch innerhalb einer Zeile beginnen oder enden:

Print 1
Print 2 /* Print 3
Print 4 */ Print 5

Spaces following are ignored. Tab characters, on the other hand, are processed:

Count(3) /*Foo
bar.print*/	Print it

This comment type has a higher priority than the line comment. Thus a is also recognized and processed within a line comment! This causes a line comment to be aborted if necessary:

1.print /*
# 2.print */ 3.print

However, it is not possible to start a block comment inside a line comment with .

Skript-Ende

Mit einem Skript-Abbruch werden alle folgenden Zeichen und Zeilen ignoriert und als Kommentar betrachtet.

The following string is used for this purpose: #**#

Print "Du kommst nicht vorbei!"
#**#
Print "Ich will aber!"

A script abort is only recognized outside of line or block comments.



- Powered by OghsWiki -

 

 

Sponsor

The development of "JayMo" is currently only possible through personal initiative.

Received:  0 €