[Gretl-users] String pointer?

2014-04-30 Thread Logan Kelly
Hello,

Are pointers to strings allowed? (I am using 1.9.15cvs on Win7 64 bit) The 
following script:

function test(string *t)
t="Hello World"
end function
string MyTestString
test(&MyTestString)
print MyTestString

yields the following error

gretl version 1.9.15cvs
Current session: 2014-04-29 19:46

? function test(string *t)
> function test(string *t)
Unrecognized data type 'string *'

Error executing script: halting
> function test(string *t)




Hello,
 
Are pointers to strings allowed? (I am using 1.9.15cvs on Win7 64 bit) The following script:

 
function test(string *t)
    t="Hello World"
end function
string MyTestString
test(&MyTestString)
print MyTestString
 
yields the following error
 
gretl version 1.9.15cvs
Current session: 2014-04-29 19:46
 
? function test(string *t)
> function test(string *t)
Unrecognized data type 'string *'
 
Error executing script: halting
> function test(string *t)





Re: [Gretl-users] String pointer?

2014-04-30 Thread Ignacio Diaz-Emparanza
On 30/04/14 02:50, Logan Kelly wrote:
>
> Hello,
>
> Are pointers to strings allowed? (I am using 1.9.15cvs on Win7 64 bit) 
> The following script:
>
> function test(string *t)
>
> t="Hello World"
>
> end function
>
> string MyTestString
>
> test(&MyTestString)
>
> print MyTestString
>
> yields the following error
>
> gretl version 1.9.15cvs
>
> Current session: 2014-04-29 19:46
>
> ? function test(string *t)
>
> > function test(string *t)
>
> Unrecognized data type 'string *'
>
> Error executing script: halting
>
> > function test(string *t)
>
>

Please, look at the Gretl users' guide:

"13.4 Function programming details

Variables versus pointers

Series, scalar, and matrix arguments to functions can be passed in two 
ways: "as they are", or as
pointers."

There is no such a feature for strings.



-- 
Firma Arista
*Ignacio Díaz-Emparanza*
Zuzendaria/Director
ignacio.diaz-emparanza(a)ehu.es 
94 6013732
*EKONOMIA APLIKATUA III SAILA (EKONOMETRIA ETA ESTATISTIKA)/ 
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU*
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
*T.: +34 946013740* | *F.: +34 946013754*
*www.ea3.ehu.es* 

ERNE! Baliteke mezu honen zatiren bat edo mezu osoa legez babestuta 
egotea. Mezuak badu bere hartzailea. Okerreko helbidera heldu bada 
(helbidea gaizki idatzi, transmisioak huts egin) eman abisu igorleari, 
korreo honi erantzunda. Kontuz! Mezua ez bada zuretzat, ez erabili, ez 
zabaldu beste inori, ez kopiatu eta ez baliatu.
¡ATENCIÓN! Este mensaje contiene información privilegiada o confidencial 
a la que sólo tiene derecho a acceder el destinatario. Si usted lo 
recibe por error le agradeceríamos que no hiciera uso de la información 
y que se pusiese en contacto con el remitente.

E-mail hau inprimatu baino lehen egiaztatu inprimatzeko beharra.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.

Title: Firma Arista

  
  
On 30/04/14 02:50, Logan Kelly wrote:


  
  
  
  
Hello,
 
Are pointers to strings allowed? (I am
  using 1.9.15cvs on Win7 64 bit) The following script:
  
 
function test(string *t)
    t="Hello World"
end function
string MyTestString
test(&MyTestString)
print MyTestString
 
yields the following error
 
gretl version 1.9.15cvs
Current session: 2014-04-29 19:46
 
? function test(string *t)
> function test(string *t)
Unrecognized data type 'string *'
 
Error executing script: halting
> function test(string *t)
  
  


Please, look at the Gretl users' guide:

"13.4 Function programming details

Variables versus pointers

Series, scalar, and matrix arguments to functions can be passed in
two ways: “as they are”, or as
pointers."

There is no such a feature for strings.



-- 
  
  
  

  
Ignacio Díaz-Emparanza
  Zuzendaria/Director 
  ignacio.diaz-empara...@ehu.es
  94 6013732
  
  

  

  
EKONOMIA
  APLIKATUA III SAILA (EKONOMETRIA ETA
  ESTATISTIKA)/ DEPARTAMENTO DE ECONOMÍA
  APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
  UPV/EHU
   Avda. Lehendakari Aguirre, 83 |
48015 BILBAO
 T.: +34 946013740 | F.:
  +34 946013754
   www.ea3.ehu.es


  

  

  
  
 ERNE! Baliteke mezu honen
  zatiren bat edo mezu osoa legez babestuta egotea. Mezuak
  badu bere hartzailea. Okerreko helbidera heldu bada
  (helbidea gaizki idatzi, transmisioak huts egin) eman
  abisu igorleari, korreo honi erantzunda. Kontuz! Mezua ez
  bada zuretzat, ez erabili, ez zabaldu beste inori, ez
  kopiatu eta ez baliatu.
  ¡ATENCIÓN! Este mensaje contiene información privilegiada
  o confidencial a la que sólo tiene derecho a acceder el
  destinatario. Si usted lo recibe por error le
  agradeceríamos que no hiciera uso de la información y que
  se pusiese en contacto con el remitente.
  
  

  

E-mail hau inprimatu baino lehen
  egiaztatu inprimatzeko beharra.
  Antes de imprimir este e-mail piense bien si es
  necesario h

Re: [Gretl-users] String pointer?

2014-04-30 Thread oleg_komashko at ukr . net
Hansl primer, p. 35: 
Each of the type-specifiers, with the exception of list and string, may be 
modified by prepending an asterisk to the associated parameter name, as in 
function scalar myfunc (matrix *y) 

--- Оригінальне повідомлення --- 
Від кого: "Logan Kelly" < logan.kelly(a)uwrf.edu > 
Дата: 30 квітня 2014, 03:52:00 

Hello,   Are pointers to strings allowed? (I am using 1.9.15cvs on Win7 64 bit) 
The following script:   function test(string *t)     t="Hello World" end 
function string MyTestString test(&MyTestString) print MyTestString   yields 
the following error   gretl version 1.9.15cvs Current session: 2014-04-29 19:46 
  ? function test(string *t) > function test(string *t) Unrecognized data type 
'string *'   Error executing script: halting > function test(string *t) 
___
Gretl-users mailing list
 Gretl-users(a)lists.wfu.edu 
 http://lists.wfu.edu/mailman/listinfo/gretl-users 
 
<<< text/html: Unrecognized >>>


Re: [Gretl-users] String pointer?

2014-04-30 Thread Logan Kelly
Thanks. I have not gotten used to the existence of the hansel primer.

The statement in the user guide is not conclusive given that bundles are not 
listed and yet can be passed as pointers.

One more silly question, why are lists and strings excluded? (This is not 
important. Just curious.)

Logan


Sent from my T-Mobile 4G LTE Device


 Original message 
From: oleg_komashko(a)ukr.net
List-Post: gretl-users@gretlml.univpm.it
Date:04/30/2014 5:25 AM (GMT-06:00)
To: Gretl list
Cc: gretl-users(a)lists.wfu.edu
Subject: Re: [Gretl-users] String pointer?

Hansl primer, p. 35:

Each of the type-specifiers, with the exception of list and string, may be 
modified by prepending
an asterisk to the associated parameter name, as in
function scalar myfunc (matrix *y)


--- ???  ---
??? : "Logan Kelly" mailto:logan.kelly(a)uwrf.edu>>
: 30 ?? 2014, 03:52:00


Hello,



Are pointers to strings allowed? (I am using 1.9.15cvs on Win7 64 bit) The 
following script:



function test(string *t)

t="Hello World"

end function

string MyTestString

test(&MyTestString)

print MyTestString



yields the following error



gretl version 1.9.15cvs

Current session: 2014-04-29 19:46



? function test(string *t)

> function test(string *t)

Unrecognized data type 'string *'



Error executing script: halting

> function test(string *t)

___
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu<mailto:Gretl-users(a)lists.wfu.edu>
http://lists.wfu.edu/mailman/listinfo/gretl-users


[http://freemail.ukr.net/api/public/message_read?a=m6q3vudMMn-_zr2hf69tAWH6VIZ-ec7uWlxGfr7HLxCtfS5N2M_dvrI0qK-Scm_8h2V7TrSN0bfBnv9pL6ZpGyDdkTzUpGFuGa7Eu_khcMnFX4Jp]
 !



Thanks. I have not gotten used to the existence of the hansel primer.  


The statement in the user guide is not conclusive given that bundles are not listed and yet can be passed as pointers. 


One more silly question, why are lists and strings excluded? (This is not important. Just curious.) 


Logan 





Sent from my T-Mobile 4G LTE Device



 Original message 
From: oleg_komas...@ukr.net 
Date:04/30/2014 5:25 AM (GMT-06:00) 
To: Gretl list 
Cc: gretl-us...@lists.wfu.edu 
Subject: Re: [Gretl-users] String pointer? 



Hansl primer, p. 35:


Each of the type-specifiers, with the exception of list and string, may be modified by prepending
an asterisk to the associated parameter name, as in
function scalar myfunc (matrix *y)



--- Оригінальне повідомлення ---
Від кого: "Logan Kelly" <logan.ke...@uwrf.edu>
Дата: 30 квітня 2014, 03:52:00





Hello,



 

Are pointers to strings allowed? (I am using 1.9.15cvs on Win7 64 bit) The following script:




 

function test(string *t)


    t="Hello World"


end function


string MyTestString


test(&MyTestString)


print MyTestString



 

yields the following error



 

gretl version 1.9.15cvs


Current session: 2014-04-29 19:46



 

? function test(string *t)


> function test(string *t)


Unrecognized data type 'string *'



 

Error executing script: halting


> function test(string *t)




___
Gretl-users mailing list
gretl-us...@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users


 !