Parameter statement is used to accept input from user. PARAMETER statement is used when you want user to enter data and depending upon what he enters you need to take action. The parameter statement declares the variable and also allows system to accept data into that variable.
Syntax.
Parameters: num type I.
Here parameter statement declares the variable and creates the selection screen on which user enters the data i.e., in this case num is declared of type I and user can enter any number. Entered value is stored in the same variable and can be used in program.
Data: m type I
Parameters: num type I
M = num – 5
Write: / ‘The number is’, m.
You can define default values with parameter statement for example
Parameter: num type I default 12.
In this case when selection screen is displayed the default value is displayed. User can either use same value or overwrite the value.
Parameter of type character and length = 1, can be displayed as Checkbox and Radiobutton.
Parameter: C1 as Checkbox,
C2 as Checkbox.
Parameter: R1 Radiobutton group g1,
R2 Radiobutton group g1.
When parameter is defined as Radiobutton, it needs to be attached to one group. Only one Radiobutton of one group can be clicked.
Every parameter can be associated with language dependent text that is displayed on the selection screen. This can be done with the help of text elements.
No comments:
Post a Comment