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

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




PostPosted: Thu Nov 27, 2008 4:39 pm   Post subject: Types and Flexible Arrays

I'm having an issue with declaring a flexible array as a part of a type. The compiler throws an error or two at me when I use the following code:

code:

type test_type :
    record
        test_array : flexible array 1 .. 0 of int % flexible Highlighted -- Syntax error at 'flexible'
    end record % end Highlighted -- Extra 'end'


Am I missing something? Is this something that Turing does not allow?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Nov 27, 2008 4:57 pm   Post subject: RE:Types and Flexible Arrays

see http://compsci.ca/v3/viewtopic.php?t=9636

Quote:

Straight out of Turing's help files on records: Any array contained in a record must have bounds that are known at compile time.


You could have a pointer that points to a flexible array though.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: