home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / parallel / 2506 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.8 KB  |  61 lines

  1. Newsgroups: comp.parallel
  2. Path: sparky!uunet!gatech!hubcap!fpst
  3. From: simons@Think.COM (Joshua Simons)
  4. Subject: Re: a question on C* (Connection Machine) syntax
  5. In-Reply-To: mlevin@husc8.harvard.edu's message of 9 Nov 92 22:11:03 EST
  6. Message-ID: <1992Nov11.130936.12649@hubcap.clemson.edu>
  7. Sender: fpst@hubcap.clemson.edu (Steve Stevenson)
  8. Nntp-Posting-Host: tuntu.think.com
  9. Organization: Thinking Machines Corporation, Cambridge MA, USA
  10. References: <1992Nov9.221103.17282@husc3.harvard.edu>
  11. Distribution: usa
  12. Date: 10 Nov 92 17:39:08
  13. Approved: parallel@hubcap.clemson.edu
  14. Lines: 45
  15.  
  16. In article <1992Nov9.221103.17282@husc3.harvard.edu> mlevin@husc8.harvard.edu (Michael Levin) writes:
  17.  
  18.  
  19. This has been answered privately, but if anyone else cares, C* is complaining
  20. for the same reason an ANSI-compatible compiler would complain: incompatible
  21. types.
  22.  
  23. -josh simons
  24.  
  25.  
  26.    From: mlevin@husc8.harvard.edu (Michael Levin)
  27.    Sender: fpst@hubcap.clemson.edu (Steve Stevenson)
  28.  
  29.        The following short C* code does not compile. The  error given by
  30.    cs is:
  31.  
  32.    "x.cs", line 12: bad operand combination for =
  33.  
  34.       the only difference between lines 12 and 10 is that the
  35.    pre-declaration of b() has a float as an argument, and  the one for
  36.    a() does not. If I change b to take int:plane, it compiles. Why is
  37.    this so? The regular C compiler has no problem with it (without the
  38.    :plane). If anyone knows what the problem is, please let me know at
  39.    mlevin@presto.cs.tufts.edu. 
  40.  
  41.    shape [128][128]plane;
  42.  
  43.    int:plane a(int:plane p); 
  44.    int:plane b(float:plane p);
  45.  
  46.    int:plane (*which_funct(s))()
  47.    char *s;
  48.    {
  49.      if (!stricmp(s,"A"))
  50.        return(a);
  51.      if (!stricmp(s,"B"))
  52.        return(b);
  53.    }
  54.  
  55. --
  56. simons@think.com
  57. thinking machines corporation
  58. 245 first street                    tel: 617.234.2844
  59. cambridge, ma  02142-1264                fax: 617.234.4444
  60.  
  61.