my_frist_hello_word函数
1.新建一个文本文档重命名为helloword.pcl
2.在新建的文档中粘贴上以下内容
FUNCTION my_frist_hello_word()
/*
my frist program which will print out 'hello word! 29' in three methods
*/
INTEGER MyFristNum
MyFristNum=29
ui_writec("Hello Word! %d\n", MyFristNum)
ui_writef("A21,1X,I3","Hello Word!", MyFristNum)
ui_write("Hello Word!" @
//STR_FROM_INTEGER(MyFristNum))
END FUNCTION/*hello word*/
3.pcl库函数建立
1)在命令行键入:“!!library create read” 此时在当前工作目录下生成新的函数库文件 read.plb.
2) 将第2步创建的pcl文件放到当前工作目录下,在命令行键入:“!!compile helloword.pcl read.plb”
将pcl文件进行编译并放在read库函数中。如果此时键入“!!library list read”就会看到在pcl中函数
my_frist_hello_word()函数。
4.函数调用在命令行中键入“my_frist_hello_word()”可以看到窗口中显示"hello word! 29......."