sub NAME PROTO ATTRS BLOCK# Named, prototype, attributes, definition sub NAME ATTRS BLOCK # Named, attributes, definition sub NAME PROTO BLOCK # Named, prototype, definition sub NAME BLOCK # Named, definition sub NAME PROTO ATTRS # Named, prototype, attributes sub NAME ATTRS # Named, attributes sub NAME PROTO # Named, prototype sub NAME # Named sub PROTO ATTRS BLOCK # Anonymous, prototype, attributes, definition sub ATTRS BLOCK # Anonymous, attributes, definition sub PROTO BLOCK # Anonymous, prototype, definition sub BLOCK # Anonymous, definition
子關鍵字定義一個新的子程序。遵循這些規則上麵顯示的參數:
NAME是在子程序的名稱。命名子程序可以預先聲明(冇有相關的代碼塊),或冇有原型規範。
匿名子程序必須有定義。
PROTO定義一個函數,當函數被調用時,將使用驗證提供的參數原型。
ATTRS定義的附加信息被聲明子程序的解析器。
Nothing