From jago@mclink.it  Wed Feb 20 11:14:51 2002
From: jago@mclink.it (Stefano Iacus)
Date: Wed, 20 Feb 2002 12:14:51 +0100
Subject: [Rd] f2c problem
In-Reply-To: <Pine.LNX.4.44.0202201122330.30989-100000@tal.stat.umu.se>
Message-ID: <0F4576C7-25F3-11D6-B62B-003065CC4CB8@mclink.it>

ok, in this case I need to write to the package maintainer. Thanks.

stefano

p.s. on MacOS there is no even the idea of g77 nor gcc.




On Mercoled, febbraio 20, 2002, at 11:27 , Gran Brostrm wrote:

> On Wed, 20 Feb 2002, Stefano Iacus wrote:
>
>> In building princurve package for MacOS I need to use f2c on fortran
>> files.
>>
>> Here is the output of f2c for getlam.f
>>
>> getlam.f:
>>     getlam:
>>     newlam:
>>     lamix:
>> Error on line 116 of getlam.f: Declaration error for v: adjustable
>> dimension on non-argument
>> Error on line 116 of getlam.f: wr_ardecls:  nonconstant array size
>>
>> what I found strange is that both newlam and get lam have definitions
>> like
>>
>>
>>   subroutine newlam(n,p,sx,lambda,tag)
>>        integer n,p,tag(n)
>>        double precision sx(n,p),lambda(n),lami
>>
>>
>> but for some reason f2c complains only with the last lamix subroutine
>>
>>    subroutine lamix(ns,p,x,s,lambda,dismin,temps)
>>        integer ns,p
>>        double precision lambda,x(p),s(ns,p),dismin,temps(p)
>>        double precision v(2,p),d1sqr,d2sqr,d12,dsqr, d1,w
>>
>> probably because v is not passed as an argument.
>
> Definitely because v is local; this construct is a gcc extension to the
> standard, I think. Solutions: 1) pass v as an argument and reserv space
> in the calling function. 2) Instead of  p, use 1000 (or some other
> large number, which p never will exceed). 3) Use gcc.
>
> Gran
>>
>> Any idea on how to manage this in f2c ?
>>
>> Stefano
>>
>> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
>> -.-.-.-
>> r-devel mailing list -- Read 
>> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>> Send "info", "help", or "[un]subscribe"
>> (in the "body", not the subject !)  To: r-devel-
>> request@stat.math.ethz.ch
>> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
>> _._._._
>>
>
> --
>  Gran Brostrm                      tel: +46 90 786 5223
>  professor                           fax: +46 90 786 6614
>  Department of Statistics            http://www.stat.umu.se/egna/gb/
>  Ume University
>  SE-90187 Ume, Sweden             e-mail: gb@stat.umu.se
>
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] f2c problem
Stefano Iacus