MFP编程语言help和endh语句和@language标注:
在MFP语言中,Help语句是一个帮助信息块的开始而endh语句是一个帮助信息块的终止。
注意虽然在一个帮助信息块中的语句不会影响函数的运行,当用户输入"help 函数名"或者"help 函数名(函数参数个数)"时帮助信息块却能提供必要的帮助信息。条件是该帮助信息块正好位于函数声明的上方。在以下例子中一个帮助信息块位于函数abcd的上方:
Help
This line will be shown for any system language.
@language:
This line will be shown for default system language.
@end
This line will also be shown for any system language.
@language:simplified_chinese
这一行将在系统语言为中文时显示(This line will be shown when system language is simplified Chinese.)。
@end
This line is also a line for any system language.
Endh
Function abcd(x, y)
Endf
。当用户输入"help abcd"或者"help abcd(2)"时,如果系统语言是英语并且英语也是默认语言,该用户将看到如下帮助信息:
This line will be shown for any system language.
This line will be shown for default system language.
This line will also be shown for any system language.
This line is also a line for any system language.
,如果系统语言是日语但是日语不是默认语言,该用户将看到如下帮助信息:
This line will be shown for any system language.
This line will also be shown for any system language.
This line is also a line for any system language.
,如果系统语言是简体中文但简体中文不是默认语言,,该用户将看到如下帮助信息:
This line will be shown for any system language.
This line will also be shown for any system language.
这一行将在系统语言为中文时显示(This line will be shown when system language is simplified Chinese.)。
This line is also a line for any system language.
,如果系统语言是简体中文而且简体中文是默认语言,,该用户将看到如下帮助信息:
This line will be shown for any system language.
This line will be shown for default system language.
This line will also be shown for any system language.
这一行将在系统语言为中文时显示(This line will be shown when system language is simplified Chinese.)。
This line is also a line for any system language.
。
如果用户仅仅只是想在一行的末尾加一些注释,可以使用类似于C++的"//",在一行中,"//"之后的内容均为注释。"//"可以位于一行最开始。