Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
FLOW-MATIC
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
== Sample Code == A sample FLOW-MATIC program:<ref>Sperry Rand (1957) p. 7.</ref><ref>Sammet (1969) p. 323.</ref> <!-- Note to editors: Blanks are sign[[If statement|IF]]icant, including before punctuation, although they are not clearly indicated in the marketing brochure. Barring transcription errors, this sample is now correct, so please do not 'fix' it unless you are absolutely sure you know what you're doing. --> ({{vanchor|0}}) INPUT INVENTORY FILE-A PRICE FILE-B ; OUTPUT PRICED-INV FILE-C UNPRICED-INV FILE-D ; HSP D . ({{vanchor|1}}) COMPARE PRODUCT-NO (A) WITH PRODUCT-NO (B) ; IF GREATER GO TO OPERATION 10 ; IF EQUAL GO TO OPERATION 5 ; OTHERWISE GO TO OPERATION 2 . ({{vanchor|2}}) TRANSFER A TO D . ({{vanchor|3}}) WRITE-ITEM D . ({{vanchor|4}}) JUMP TO OPERATION 8 . ({{vanchor|5}}) TRANSFER A TO C . ({{vanchor|6}}) MOVE UNIT-PRICE (B) TO UNIT-PRICE (C) . ({{vanchor|7}}) WRITE-ITEM C . ({{vanchor|8}}) READ-ITEM A ; IF END OF DATA GO TO OPERATION 14 . ({{vanchor|9}}) JUMP TO OPERATION 1 . ({{vanchor|10}}) READ-ITEM B ; IF END OF DATA GO TO OPERATION 12 . ({{vanchor|11}}) JUMP TO OPERATION 1 . ({{vanchor|12}}) SET OPERATION 9 TO GO TO OPERATION 2 . ({{vanchor|13}}) JUMP TO OPERATION 2 . ({{vanchor|14}}) TEST PRODUCT-NO (B) AGAINST ; IF EQUAL GO TO OPERATION 16 ; OTHERWISE GO TO OPERATION 15 . ({{vanchor|15}}) REWIND B . ({{vanchor|16}}) CLOSE-OUT FILES C ; D . ({{vanchor|17}}) STOP . (END) Sample Notes # Note that this sample includes only the executable statements of the program, the {{code|COMPILER}} section. The record fields {{code|PRODUCT-NO}} and {{code|UNIT-PRICE}} would have been defined in the {{code|DIRECTORY}} section, which ([[FLOW-MATIC#Innovations and influence|as previously noted]]) did not use English-like syntax.<ref>Hopper (1978) p. 18.</ref> # Files are referred to by the letter at the end of the FILE-LETTER. Example: FILE-A is referred to later just by A and is for ease of reference in following code. # Operations are numbered in an unbroken sequence from 0..n and are performed in that order unless a statement to the contrary is reached/made (executed) (JUMP, etc.). # The highest numbered operation is the one that stops the program. # A much more detailed overview of FLOW-MATIC is available in the manual titled, FLOW-MATIC PROGRAMMING SYSTEM<ref>Remington Rand Univac a Division of Sperry Rand Corporation (1957). FLOW-MATIC PROGRAMMING SYSTEM</ref>
Summary:
Please note that all contributions to Niidae 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
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
FLOW-MATIC
(section)
Add topic