Editing
Scanco User Instructions
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Your First DCL Script=== Ever since Kernighan and Ritchie wrote the book "The C Programming Language", it has been custom to start with a program that prints the text "Hello, world" to the screen. Open a text editor (for example "EVE") and enter the text below. <pre> $! My First DCL Script $ mymessage = "Hello, world" $ WRITE SYS$OUTPUT mymessage $ EXIT </pre> Now save the file as HELLO1.COM, and run it using <pre>$ @HELLO1.COM</pre> Several things are happening in the above program: *'''Comment !''': The exclamation mark can appear anywhere on the line, and everything following the mark will be treated as a comment. *'''Variable''': "mymessage" variable is populated with the string "Hello, world", which can be used in the rest of the script. *'''Command''' "WRITE" send text to various places, in this case to "SYS$OUTPUT", that is to the standard output (i.e. screen). *'''EXIT''' command tells the DCL interpreter that the script is done and we should exit. *Commands in DCL are '''NOT case sensitive''', so the command "write sys$output mymessage" would produce the exact same result, but by convention we write commands in all uppercase. *'''Special Comment !!''' automatically prints the contents of the comment to the screen/logfile. It is useful when you want to know what part of the script you are in.
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information