SuperCard 程式設計/基礎/欄位
外觀
< SuperCard 程式設計 | 基礎
SuperCard 中的欄位用於儲存文字。
欄位具有樣式屬性。
文字是欄位的內在屬性。實際上,欄位的文字屬性在獲取或設定時無需命名。實際上,與其他語言和程式設計環境相比,這可能看起來違反直覺。要獲取或設定欄位的文字,只需將文字字串或變數放入或從欄位中獲取或放入。請參閱以下欄位語法示例。
您可能認為您可以簡單地執行以下操作
-- WARNING!! Incorrect Code! get field [name of field] put it into [variable name]
但是,欄位屬於卡片或背景,因此在獲取或設定欄位中的文字時,您必須指定此項
get [cd/card/bg/background] field [name of field] put it into [variable name]
put [cd/card/bg/background] field [name of field] into [variable name]
與獲取欄位內容一樣,在放入資料時,您必須指定卡片或背景
put [literal string/variable name] into [cd/card/bg/background] field [name of field]
repeat with x = 1 to the number of [cd/card/bg/background] fields [code to work with fields] -- example [cd/card/bg/background] field x end repeat