-
Notifications
You must be signed in to change notification settings - Fork 1
begin
Tristan Hume edited this page Apr 23, 2012
·
2 revisions
#begin
##Syntax A beginStatement is:
begin statementsAndDeclarations end
##Description A begin statement limits the scope of declarations made within it to the confines of the begin/end block. In Turing, begin is rarely used, because declarations can appear wherever statements can appear, and because every structured statement such as if ends with an explicit end.
##Example
begin
var bigArray : array 1 .. 2000 of real
� bigArray will exist only inside this begin statement�
end
##Details In Pascal programs, begin statements are quite common because they are required for grouping two or more statements, for example, to group the statements that follow then. This is not necessary in Turing as where ever you can write a single statement, you can also write several statements.