- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If an array is named READ and then is used in an expression, will it search for an input to read?
For example, if units 3,4,5,6,7,8,9,10 and 50 are used to open files, and then an array is used in an expression such as, DREG=READ(0), will the program look for a file with unit 0 to read? could that cause an access violation?
thanks
For example, if units 3,4,5,6,7,8,9,10 and 50 are used to open files, and then an array is used in an expression such as, DREG=READ(0), will the program look for a file with unit 0 to read? could that cause an access violation?
thanks
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. READ is a statement, not a function, and the compiler can distinguish between the two. In your case, READ is assumed to be a user-defined function, unless declared as an array.
You could get an access violation if there is no element 0 of READ, though you should get a bounds error instead if bounds checking is enabled.
Steve
You could get an access violation if there is no element 0 of READ, though you should get a bounds error instead if bounds checking is enabled.
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page