User Language: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
'''User Language''' is the internal language of the [[Model 204]] DBMS, a product of [[Rocket Software]].  It's is a 4th Generation Language (4GL), which means it was designed to be a "high level" language, with a good deal of abstraction and power embedded in relatively simple programming directives.
'''User Language''' is the internal language of the <var class="product">[[Model 204]]</var> DBMS, a product of [http://www.rocketsoftware.com/m204 Rocket Software].  It's is a 4th Generation Language (4GL), which means it was designed to be a "high level" language, with a good deal of abstraction and power embedded in relatively simple programming directives.


User Language is characterized by it's very easy, English-like syntax and its tight integration with the Model 204 DBMS.  Programs begin with a "BEGIN" statement and end with "END".
<var class="product">User Language</var> is characterized by it's very easy, English-like syntax and its tight integration with the <var class="product">Model 204</var> DBMS.  Programs begin with a "BEGIN" statement and end with "END".


  BEGIN
  BEGIN
Line 7: Line 7:
  END
  END


Because it is tightly integrated into Model 204, User Language contains native instructions for manipulating data held in Model 204 files.  Records in a file are selected using variations on the '''FIND''' statement and can be looped over using a variety of structures, the main one being the '''FOR EACH RECORD''' loop.
Because it is tightly integrated into <var class="product">Model 204</var>, <var class="product">User Language</var> contains native instructions for manipulating data held in <var class="product">Model 204</var> files.  Records in a file are selected using variations on the '''FIND''' statement and can be looped over using a variety of structures, the main one being the '''FOR EACH RECORD''' loop.


  BEGIN
  BEGIN
Line 17: Line 17:
  END
  END


In User Language, variables begin with the percent sign (%) and native "functions" -- which implement many complex features of the language -- begin with a dollar sign ($) or a pound-sign in England, or Yen sign in Japan.
In <var class="product">User Language</var>, variables begin with the percent sign (%) and native "functions" -- which implement many complex features of the language -- begin with a dollar sign ($) or a pound-sign in England, or Yen sign in Japan.


  BEGIN
  BEGIN
Line 32: Line 32:
A wide variety of variations are possible with the language, allowing novice coders to start using the language quickly, and expert users to learn the shortcuts and abbreviations.
A wide variety of variations are possible with the language, allowing novice coders to start using the language quickly, and expert users to learn the shortcuts and abbreviations.


Model 204 provides its own terminal services, and User Language procedures are typically stored in Model 204 database files, so User Language programmers usually work directly inside the database environment, opening database files at the command level, editing User Language with Model 204's internal editor, and running programs with the "GO" directive from inside the editor.
<var class="product">Model 204</var> provides its own terminal services, and <var class="product">User Language</var> procedures are typically stored in <var class="product">Model 204</var> database files, so <var class="product">User Language</var> programmers usually work directly inside the database environment, opening database files at the command level, editing <var class="product">User Language</var> with <var class="product">Model 204</var>'s internal editor, and running programs with the "GO" directive from inside the editor.


It is also possible to access Model 204 from external programs using Host Language Interfaces or Model 204's SQL capability but, because User Language is so highly optimized, the majority of Model 204 applications are written in User Language.
It is also possible to access <var class="product">Model 204</var> from external programs using Host Language Interfaces or <var class="product">Model 204</var>'s SQL capability but, because <var class="product">User Language</var> is so highly optimized, the majority of <var class="product">Model 204</var> applications are written in <var class="product">User Language</var>.


==Sirius Software extensions to User Language==
==Sirius Software extensions to User Language==


Any Model 204 site with the [[Sirius Mods]] linked in, gains a number of enhancements to User Language, the most obvious one being [[Mixed-case User Language]]:
Any <var class="product">Model 204</var> site with the <var class="product">[[Sirius Mods]]</var> linked in, gains a number of enhancements to <var class="product">User Language</var>, the most obvious one being [[Mixed-case User Language|mixed-case User Language]]:


  Begin
  Begin
Line 44: Line 44:
  End
  End


Sirius has a host of Object-Oriented additions to User Language the allow sophisticated applications to be written using a range of classes, some provided by Sirius and others that can be written locally.  The Object-Oriented additions to User Language are contained in the [[Janus SOAP User Language Interface]].
Sirius has a host of Object-Oriented additions to <var class="product">User Language</var> the allow sophisticated applications to be written using a range of classes, some provided by Sirius and others that can be written locally.  The Object-Oriented additions to <var class="product">User Language</var> are contained in the <var class="product">[[Janus SOAP User Language Interface]]</var>.


Sirius also provides a large set of User Language $functions.  At present, Sirius is not developing new functions, as our emphasis has evolved to the development of classes.  The $functions and classes provided by Sirius range from simple functions we feel are useful in the language ($Parse and $ParseX) to complex structures and constructs like [[Stringlist_class|Stringlists]] and [[Daemon class|Daemons]] that open up new ways of programming and new possibilities for managing complex, in-memory data manipulation.
Sirius also provides a large set of <var class="product">User Language</var> $functions.  At present, Sirius is not developing new functions, as our emphasis has evolved to the development of classes.  The $functions and classes provided by Sirius range from simple functions we feel are useful in the language (<var>[[$Parse]]</var> and <var>[[$ParseX]]</var>) to complex structures and constructs like <var>[[Stringlist_class|Stringlists]]</var> and <var class="product">[[Daemon class|Daemons]]</var> that open up new ways of programming and new possibilities for managing complex, in-memory data manipulation.


In addition, many of the Sirius extensions to User Language are in support of our '''Janus product set''', which provide access to Model 204 via http, sockets, Sybase Omni servers, ftp clients, and more.
In addition, many of the Sirius extensions to <var class="product">User Language</var> are in support of our '''Janus product set''', which provide access to <var class="product">Model 204</var> via HTTP, sockets, Sybase Omni servers, FTP clients, and more.


==References==
==References==
<var class="product">Model 204</var> documentation, including the User Language Reference Manual: http://www.cca-int.com/custsupp/documentation/catalog.html


The Model 204 Documentation, including the User Language Reference Manual, are here: http://www.cca-int.com/custsupp/documentation/catalog.html
Additional Sirius Software <var class="product">User Language</var> extensions: [[Janus SOAP User Language Interface#Other User Language enhancements|"Other User Language enhancements"]]
 
Many Sirius Software User Language extensions are documented in the Janus SOAP Reference Manual: http://sirius-software.com/maint/download/jansoapr.pdf

Revision as of 22:37, 7 September 2011

User Language is the internal language of the Model 204 DBMS, a product of Rocket Software. It's is a 4th Generation Language (4GL), which means it was designed to be a "high level" language, with a good deal of abstraction and power embedded in relatively simple programming directives.

User Language is characterized by it's very easy, English-like syntax and its tight integration with the Model 204 DBMS. Programs begin with a "BEGIN" statement and end with "END".

BEGIN
PRINT 'HELLO WORLD'
END

Because it is tightly integrated into Model 204, User Language contains native instructions for manipulating data held in Model 204 files. Records in a file are selected using variations on the FIND statement and can be looped over using a variety of structures, the main one being the FOR EACH RECORD loop.

BEGIN
X: IN FILE INVENTORY FIND ALL RECORDS FOR WHICH ITEMTYPE = 'BOOK'
   END FIND
   FOR EACH RECORD IN X
      PRINT TITLE AND AUTHOR AND PUBLISHER AND PRICE
   END FOR
END

In User Language, variables begin with the percent sign (%) and native "functions" -- which implement many complex features of the language -- begin with a dollar sign ($) or a pound-sign in England, or Yen sign in Japan.

BEGIN
  %X IS FLOAT
  FOR %X FROM 1 TO 10
     IF $MOD(%X,2) THEN
        PRINT %X WITH ' IS ODD'
     ELSE
        PRINT %X WITH ' IS EVEN'
     END IF
  END FOR
END

A wide variety of variations are possible with the language, allowing novice coders to start using the language quickly, and expert users to learn the shortcuts and abbreviations.

Model 204 provides its own terminal services, and User Language procedures are typically stored in Model 204 database files, so User Language programmers usually work directly inside the database environment, opening database files at the command level, editing User Language with Model 204's internal editor, and running programs with the "GO" directive from inside the editor.

It is also possible to access Model 204 from external programs using Host Language Interfaces or Model 204's SQL capability but, because User Language is so highly optimized, the majority of Model 204 applications are written in User Language.

Sirius Software extensions to User Language

Any Model 204 site with the Sirius Mods linked in, gains a number of enhancements to User Language, the most obvious one being mixed-case User Language:

Begin
print 'Hello World'
End

Sirius has a host of Object-Oriented additions to User Language the allow sophisticated applications to be written using a range of classes, some provided by Sirius and others that can be written locally. The Object-Oriented additions to User Language are contained in the Janus SOAP User Language Interface.

Sirius also provides a large set of User Language $functions. At present, Sirius is not developing new functions, as our emphasis has evolved to the development of classes. The $functions and classes provided by Sirius range from simple functions we feel are useful in the language ($Parse and $ParseX) to complex structures and constructs like Stringlists and Daemons that open up new ways of programming and new possibilities for managing complex, in-memory data manipulation.

In addition, many of the Sirius extensions to User Language are in support of our Janus product set, which provide access to Model 204 via HTTP, sockets, Sybase Omni servers, FTP clients, and more.

References

Model 204 documentation, including the User Language Reference Manual: http://www.cca-int.com/custsupp/documentation/catalog.html

Additional Sirius Software User Language extensions: "Other User Language enhancements"