Thank you, William and Berend, for your thorough replies. I have still the habit of setting "long int" variables because, when I first learnt C, the manual said that "int" could be up to around 3.2e4. But I suppose that, in systems from 32 bits, an "int" number can be much larger, isn't it?
- which version of Mac OS X? > 10.6.4 > - Which version of R? (version, architecture) > The version is 2.11.1 (although I had the same problem with the previous version). I downloaded the binary for Mac from r-project. In the Applications menu, I can see "R" and "R64". Nevertheless, I start R in the command line: like this, I suppose it is the 64 bits version which starts, isn't it? > - Officially provided R or compiled by you? Official R is compiled with > Apple gcc. > The official one. > - if R was compiled with Apple compiler, who knows what can happen if you > link with code compiled with a non Apple gcc? > It is the official. Nevertheless, my code C for R works in Linux whether I compile my C functions with gcc or with icc. > - if the code runs ok on your supervisors iMac: did he use Apple compiler? > I do not think he compiled it himself. For the architecture, he does not remember well, he has said that he thinks that he is using a version of R that was compiled in 32 bits. > if so I wouldn't be surprised if your Macports compiler is a possible cause > of your troubles. > I do not think so. Both R and the "default" gcc did not come from Macports. The "default" gcc came with Xcode in the extras' cd (by the way, how can gcc in Mac be upgraded?). > - on 64bit Mac OS X long int is 64bits and int is 32bits; on 32bit Mac OSX > both are 32 bits. > Thank you. As I said, chaging from "unsigned long int" to "int" seemed to solve the problem. David Can you please Cc to me any replies, just in case I may miss any of them among the whole amount of emails :-) ? [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.