* DEC C not K&R or ANSI?
@ 1997-05-15 16:46 Jon Brinkmann
0 siblings, 0 replies; only message in thread
From: Jon Brinkmann @ 1997-05-15 16:46 UTC (permalink / raw)
To: tru64-unix-managers
I've tried the following test program:
#define N 10
void main()
{
int a[N,N], i, j;
for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
a[i, j] = N * i + j;
}
The compiler says:
% cc -o atest -g atest.c
/usr/lib/cmplrs/cc/cfe: Error: atest.c, line 6: Syntax Error
int a[10,10], i, j;
--------^
% lint atest.c
"atest.c", line 6: error: syntax error
"atest.c", line 10: warning: a undefined
"atest.c", line 10: error: illegal indirection
"atest.c", line 12: warning: main() returns random value to invocation environment
What's going on here?
Jon
---
Dr. Jon Brinkmann Apache Point Observatory
Instrument Scientist 2001 Apache Point Road
Internet: brinkmann@nmsu.edu P.O. Box 59
URL: http://www.apo.nmsu.edu/brinkmann/ Sunspot, NM 88349-0059
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-05-15 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-15 16:46 DEC C not K&R or ANSI? Jon Brinkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox