home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.parallel
- Path: sparky!uunet!gatech!hubcap!fpst
- From: simons@Think.COM (Joshua Simons)
- Subject: Re: a question on C* (Connection Machine) syntax
- In-Reply-To: mlevin@husc8.harvard.edu's message of 9 Nov 92 22:11:03 EST
- Message-ID: <1992Nov11.130936.12649@hubcap.clemson.edu>
- Sender: fpst@hubcap.clemson.edu (Steve Stevenson)
- Nntp-Posting-Host: tuntu.think.com
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- References: <1992Nov9.221103.17282@husc3.harvard.edu>
- Distribution: usa
- Date: 10 Nov 92 17:39:08
- Approved: parallel@hubcap.clemson.edu
- Lines: 45
-
- In article <1992Nov9.221103.17282@husc3.harvard.edu> mlevin@husc8.harvard.edu (Michael Levin) writes:
-
-
- This has been answered privately, but if anyone else cares, C* is complaining
- for the same reason an ANSI-compatible compiler would complain: incompatible
- types.
-
- -josh simons
-
-
- From: mlevin@husc8.harvard.edu (Michael Levin)
- Sender: fpst@hubcap.clemson.edu (Steve Stevenson)
-
- The following short C* code does not compile. The error given by
- cs is:
-
- "x.cs", line 12: bad operand combination for =
-
- the only difference between lines 12 and 10 is that the
- pre-declaration of b() has a float as an argument, and the one for
- a() does not. If I change b to take int:plane, it compiles. Why is
- this so? The regular C compiler has no problem with it (without the
- :plane). If anyone knows what the problem is, please let me know at
- mlevin@presto.cs.tufts.edu.
-
- shape [128][128]plane;
-
- int:plane a(int:plane p);
- int:plane b(float:plane p);
-
- int:plane (*which_funct(s))()
- char *s;
- {
- if (!stricmp(s,"A"))
- return(a);
- if (!stricmp(s,"B"))
- return(b);
- }
-
- --
- simons@think.com
- thinking machines corporation
- 245 first street tel: 617.234.2844
- cambridge, ma 02142-1264 fax: 617.234.4444
-
-