Thread View: eunet.micro.acorn
1 messages
1 total messages
Started by Pete Goodwin
Tue, 19 Feb 1991 19:30
Re: More about BASIC vs. Pascal vs. C (the flame war continues !)
Author: Pete Goodwin
Date: Tue, 19 Feb 1991 19:30
Date: Tue, 19 Feb 1991 19:30
25 lines
1627 bytes
1627 bytes
In article <1991Feb15.131220.7801@vax1.tcd.ie>, hughesmp@vax1.tcd.ie writes...
>Just out of interest, is there an equivalent of the BASIC 'DATA', 'READ',
>and 'RESTORE' constructs in C, PASCAL, or MODULA2? I would have thought
>there _might_ have been a problem with something like that in a compiled
>language, but haven't heard of any BASIC compilers not coping with it, so
>presume it isn't.
>
>It is very useful for storing data in your program, yet as far as I know,
>such a facility is not available in C, and PASCAL, and these other languages
>with their complex data structures, and what not?
C certainly does. As in:
struct temp {
int x, y, z;
};
struct temp[] = { { 1, 2, 3}, {3, 2, 1} };
It goes a lot further, with clarity, than BASIC's DATA statements.
As for PASCAL and MODULA2, I wish they did!
Pete
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads