3.8. const $ (constant integer)
declare const $
Declare a user-defined constant to store a single integer value
Remarks
• As the name implies, the value of constant variables can only be read, not changed.
• It is quite common to capitalize the names of constants.
Examples
on init
declare const $NUM_OF_PRESETS := 10
declare const $NUM_OF_PARAMETERS := 5
declare %preset_data[$NUM_OF_PRESETS * $NUM_OF_PARAMETERS]
end on
Creating constants – useful when creating preset arrays
on init
3.9. const ~ (real constant)
declare const ~
Declare a user-defined constant to store a single real value
Remarks
• As the name implies, the value of constant variables can only be read, not changed.
• It is quite common to capitalize the names of constants.
Examples
on init
declare const ~BIG_NUMBER := 100000.0
declare const ~SMALL_NUMBER := 0.00001
end on
Variables
18
KSP Reference Manual
Do'stlaringiz bilan baham: |