Task

Demonstrate a language's methods of:

   variable declaration
   initialization
   assignment
   datatypes
   scope 
   referencing,     and 
   other variable related facilities


# variable declaration
#
# declare [type] [name]
# 	-or-
# decl [type] [name]
decl int test
 
# initialization / assignment
#
# the set statement can be used to init variables and
# assign values to them
set test 10
 
# datatypes
#
# ursa currently has 10 built-in types, but
# more may be added in the future. 
#     boolean
#     double
#     file
#     function
#     int
#     iodevice
#     port
#     serverport
#     string
#     task
#
# also, java classes may be used as data types
# cygnus/x ursa
 
# scope
#
# there is a global variable space, and functions
# have their own scope. control statements (for,
# if, try, while) don't have their own scope yet,
# but this will be implemented in the near future
 
# referencing
#
# variables are referenced by their name
decl port p
out p endl console