【正文】
omatically assigned to the variable default value. Such as: numerical variables default initial value is 0. ) ? PowerScript語(yǔ)言 ? 變量的作用域就是變量使用的范圍 變量的作用 ? 全局變量 的作用域最大 , 它在應(yīng)用程序的任何地方都可以使用 。 ? 實(shí)例變量 是某個(gè)特定對(duì)象可使用的變量 。 ? 共享變量 是某類(lèi)特定對(duì)象可使用的變量,并不常用。 ? 局部變量 只能在某程序段或函數(shù)內(nèi)部有效,可以在過(guò)程、代碼、函數(shù)內(nèi)部聲明和使用局部變量 PowerScript語(yǔ)言 Variable scope is the scope of the variable used The role of the variable ? The largest global variable scope, its application can be used anywhere. ? A particular object instance variable is a variable that can be used. ? Shared variable is a particular object of certain variables that can be used is not monly used. ? Local variables can only be in a program segment or function within the force, in the process, the code inside the function declaration and the use of local variables PowerScript語(yǔ)言 基本語(yǔ)句 (Basic Statements ) 賦值語(yǔ)句 (=) Assignment statement (=) 循環(huán)語(yǔ)句 (LOOP) do…loop 結(jié)構(gòu)和for…next Loop (LOOP) do ... loop structure and the for ... next 流程控制語(yǔ)句 (EXIT) Flow control statements (EXIT) 條件語(yǔ)句 (IF) Conditional statements (IF) PowerScript語(yǔ)言 基本語(yǔ)句 (Common use of pronouns ) 對(duì)象事件觸發(fā)語(yǔ)句 The object event trigger statement 用法: ( event {, word, long } ) PowerScript語(yǔ)言 常用代詞的使用 ( 1) This代詞 This代詞代表窗口、用戶(hù)對(duì)象、菜單、應(yīng)用對(duì)象或控件本身。 ( 2) Parent代詞 Parent代詞可以用在窗口控件、用戶(hù)定制的對(duì)象。在窗口控件中使用parent時(shí), parent表示包含該控件的窗口。 ( 3) ParentWindow代詞 ParentWindow代詞只能在菜單腳本中使用,它代表運(yùn)行時(shí)菜單所在的窗口 ? PowerScript語(yǔ)言 ? Common use of pronouns ?(1) This pronoun ?This pronoun on behalf of the window, user object, menu, application object or the control itself. ?(2) Parent pronoun ?Parent pronoun can be used in the window controls, custom objects. The use of parent control in the window when, parent window that contains the control. ?(3) ParentWindow pronoun ?ParentWindow pronoun to use only the script in the menu, which represents the window where the runtime menu. 教學(xué)內(nèi)容 32 編程基礎(chǔ)與常用控件技術(shù) 對(duì)象編程基礎(chǔ) PowerScript語(yǔ)言 窗口控件 常用函數(shù) 對(duì)象菜單 窗口控件 激活動(dòng)作的控件:用于激活某個(gè)事件,執(zhí)行一些功能性操作。如 CommandButton、 PictureButton。 顯示數(shù)據(jù)的控件:用于輸入、修改、顯示數(shù)據(jù)等。如DataWindows、 SingleLineEdit。 用作選擇項(xiàng)的控件:用于從若干信息中選擇信息。如RadioButton、 CheckBox。 僅作修飾的控件:用于修飾窗口,使窗口更清晰、美觀。如 Line、 Rectangle、 RoundRectangle、 Oval。 從功能角度看,控件分為 窗口控件 Activated action control: used to activate an event, perform some functional operations. Such as CommandButton, PictureButton. Display data control: used to enter, modify, display data. If DataWindows, SingleLineEdit. Select items for the control: for information from a number of select information. As RadioButton, CheckBox. Modified only control: used to modify the window, so that the window is more clear, beautiful. Such as Line, Rectangle, RoundRectangle, Oval. From a functional point of view, control is divided into 窗口控件 窗口中的控件操作 添加控件 復(fù)制控件 選擇控件 刪除控件 窗口控件 常用控件 —— 命令按鈕 CommandButton —— 單選鈕 RadioButton —— 復(fù)選框 CheckBox —— 單行編輯框 S