Scope modifiers: Difference between revisions
Content deleted Content added
Go explanation |
m →Icon and Unicon: header simplification |
||
Line 135: | Line 135: | ||
|} |
|} |
||
== |
=={{header|Icon}} and {{header|Unicon}}== |
||
Icon and Unicon data types are not declared and variables can take on any value; however, variables can be declared as to their scope. For more see [[Icon%2BUnicon/Intro#un-Declarations.2C_it.27s_all_about_Scope|un-Declarations it's all about scope]]. |
Icon and Unicon data types are not declared and variables can take on any value; however, variables can be declared as to their scope. For more see [[Icon%2BUnicon/Intro#un-Declarations.2C_it.27s_all_about_Scope|un-Declarations it's all about scope]]. Additionally, Unicon supports classes with methods. |
||
==={{header|Icon}}=== |
|||
<lang Icon>global var1 # used outside of procedures |
<lang Icon>global var1 # used outside of procedures |
||
Line 144: | Line 143: | ||
static var3 # also used inside of procedures |
static var3 # also used inside of procedures |
||
end</lang> |
end</lang> |
||
==={{header|Unicon}}=== |
|||
This Icon solution works in Unicon. Additionally Unicon supports classes with methods. |
|||
=={{header|J}}== |
=={{header|J}}== |