User Tools

Site Tools


dcl_lexical_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
dcl_lexical_functions [2018/11/20 19:52] lrickerdcl_lexical_functions [2018/11/20 22:49] – WIP lricker
Line 49: Line 49:
   (...displays the complete list of lexical functions...)   (...displays the complete list of lexical functions...)
 </code> </code>
 +
 +The HELP Lexicals entry lists the Lexical Functions alphabetically, which may not be particularly helpful in learning them.  See the wiki article [[Catalog of DCL Lexical Functions]] for a category/functional list of these Lexicals.
  
 ==== Experimenting With and Learning Lexical Functions ==== ==== Experimenting With and Learning Lexical Functions ====
Line 62: Line 64:
 This is a test! This is a test!
 $ $
 +</code>
 +
 +Now you can do things like this:
 +<code>
 +$ wso F$TIME()
 +20-NOV-2018 15:33:43.06
 +$
 +</code>
 +
 +...or:
 +<code>
 +$ string = "test"
 +$ wso F$LOCATE( string, "This is a test..." )
 +10
 +$ ! The substring "test" is found at location/position 10 in the larger string.
 +$ ! Position 0 is the first character of that string.
 +</code>
 +
 +<code>
 +$ wso 
 +$ wso F$TRNLNM( "SYS$DISK" )
 +DSA2:
 +$ wso F$DIRECTORY()
 +[LRICKER]
 +$ wso F$SEARCH( "LOGIN*.COM" )
 +DSA2:[LRICKER]LOGIN.COM;10
 +$
 +</code>
 +
 +<code>
 +$ wso F$MODE()
 +INTERACTIVE
 +$
 +</code>
 +
 +<code>
 +$ wso  F$TRNLNM( "SYS$SYSDEVICE", "LNM$SYSTEM_TABLE" )
 +$32$DKA0:
 +$
 +</code>
 +
 +<code>
 +$ fname = "SYS$LOGIN:LOGIN.COM"
 +$ wso F$PARSE( fname, , , "NAME", "SYNTAX_ONLY") + F$PARSE( fname, , , "TYPE", "SYNTAX_ONLY" )
 +LOGIN.COM
 +$
 +</code>
 +
 +<code>
 +$ start = F$TIME()
 +$ ! ...wait a bit...
 +$ !    ...dum-de-dum...
 +$
 +$ wso F$DELTA_TIME( start, F$TIME(), "DCL")
 +0-00:00:21.07
 +$ ! Twenty-one seconds later!...
 </code> </code>
  
dcl_lexical_functions.txt · Last modified: 2018/12/03 20:02 by lricker

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki