Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SAIL (programming language)
(section)
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!
===Records and pointers=== The concept of [[Record (computer science)|records]] as a data type had only recently been introduced when SAIL was being written. This feature thus shows the signs of being "bolted on" to the language syntax. For instance a record structure was defined using the {{code|RECORD!CLASS}} statement: {{code|RECORD!CLASS person (STRING name, address; INTEGER accountnum; REAL balance)|pascal}}. This statement worked in a fashion similar to the {{code|RECORD}} statement in Pascal, defining the template for the record. To create a record, one used the {{code|NEW!RECORD}} statement, which returned a {{code|RECORD!POINTER}}. Pointers were typed, and could be typed to more than one type, for instance, {{code|RECORD POINTER (person,university) rp;|pascal}} defines rp, a pointer to either a person or university record.{{sfn|Smith|1976|p=40}} Pointers could also be declared to point to {{code|ANY!CLASS}}.{{sfn|Smith|1976|p=41}} Accessing the data in a record was similarly idiosyncratic; to print the name file of a person, for instance, the syntax was {{code|PRINT(person:name[rp]);}}.{{sfn|Smith|1976|p=41}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)