Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing Help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Goooney




PostPosted: Tue Jan 17, 2012 10:16 pm   Post subject: Turing Help

procedure DisplayArray (var boardPos : array 0 .. 1000, 0 .. 1000 of boardRec, column, rows : int)
for i : 1 .. column
for j : 1 .. rows
if boardPos (i, j).covered = 0 then
put "X" : 5 ..

elsif boardPos (i, j).covered = 1 then
put boardPos (i, j).NumMines : 5 ..

elsif boardPos (i, j).covered = 2 then
put "F" : 5 ..

end if
end for
put ""
put ""
end for
end DisplayArray

When I run this procedure, the "X" and the "F" line up fine. But with boardPos it doesn't. Im assuming it has something to do with with boardPos being a number and "X" and "F" being strings. PLEASE HELP!
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: