Hints to read zscript"

From Documentation
(Created page with '{{ZKDevelopersGuidePageHeader}} When beginner first meet <tt>zscript</tt>, he usually get confused with "where is the declaration of such variable?". ZK use [http://www.beanshe…')
 
m (correct highlight (via JWB))
 
Line 2: Line 2:
  
  
When beginner first meet <tt>zscript</tt>, he usually get confused with "where is the declaration of such variable?". ZK use [http://www.beanshell.org/ Beanshell] as java interpreter. As [http://www.beanshell.org/docs.html Beanshell's manual] says: '''Beanshell supports "loose" or dynamically typed variable. That is, you can refer to variables without declaring them first and without specifying any type.''' Also, <tt>zscript</tt> can access component's field and implicit object, they may look like strange undeclared variables to java programmer.
+
When beginner first meet <code>zscript</code>, he usually get confused with "where is the declaration of such variable?". ZK use [http://www.beanshell.org/ Beanshell] as java interpreter. As [http://www.beanshell.org/docs.html Beanshell's manual] says: '''Beanshell supports "loose" or dynamically typed variable. That is, you can refer to variables without declaring them first and without specifying any type.''' Also, <code>zscript</code> can access component's field and implicit object, they may look like strange undeclared variables to java programmer.
  
 
Some packages are imported implicitly by Beanshell, but some package have to be imported by developer.
 
Some packages are imported implicitly by Beanshell, but some package have to be imported by developer.
  
Typical usage of <tt>zscript</tt> includes initialization and declaring global variables and methods.
+
Typical usage of <code>zscript</code> includes initialization and declaring global variables and methods.
  
  
 
{{ ZKDevelopersGuidePageFooter}}
 
{{ ZKDevelopersGuidePageFooter}}

Latest revision as of 10:38, 19 January 2022

Stop.png This documentation is for an older version of ZK. For the latest one, please click here.



When beginner first meet zscript, he usually get confused with "where is the declaration of such variable?". ZK use Beanshell as java interpreter. As Beanshell's manual says: Beanshell supports "loose" or dynamically typed variable. That is, you can refer to variables without declaring them first and without specifying any type. Also, zscript can access component's field and implicit object, they may look like strange undeclared variables to java programmer.

Some packages are imported implicitly by Beanshell, but some package have to be imported by developer.

Typical usage of zscript includes initialization and declaring global variables and methods.



Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.