[vsni.co.uk] Contact us
Author Message
Post new topic

  GenStat  ~  Procedure parameter question

Steve Langton
Posted: Tue Jun 26, 2018 9:55 pm Reply with quote
Guest
I usually use PARAMETER=dummy in procedures, but I’ve looked back and found one I wrote many years ago with PARAMETER=pointer. The way I got around the odd behaviour of SET/UNSET was to use the following lines, modified to use your parameter names:
SCALAR nvc;NVALUES(DATA)
GETAT [stype] LABELS[1...#nvc];sty[1...#nvc]
PRINT sty[][]

If LABELS is unset the sty[][] will be ‘dummy’, if it is set to a text structure they will be ‘text’.

I’m sure Roger or David will have a neater solution, but this seemed to work.

Steve

****************************************************************************
Steve Langton, Hallgarth, Leavening, Malton, N. Yorks. YO17 9SA
Phone: +44(0)1653 658346 Mobile: +44(0)7930478749
Email: stats@slangton.org.uk (stats@slangton.org.uk)
****************************************************************************


From: GENSTAT-Request <GENSTAT@jiscmail.ac.uk> On Behalf Of Andrew McLachlan
Sent: 26 June 2018 05:05
To: GENSTAT@JISCMAIL.AC.UK
Subject: Re: Procedure parameter question



Hi Murray

Yes, I had briefly thought of doing that, but as you say I then decided to try to use DATA as a simple list. I will give your approach some more thought.

Cheers,
Andrew Mc

Andrew McLachlan
Biometrician

From: GENSTAT-Request [mailto:GENSTAT@jiscmail.ac.uk (GENSTAT@jiscmail.ac.uk)] On Behalf Of Murray Hannah
Sent: Monday, 25 June 2018 11:47 a.m.
To: GENSTAT@JISCMAIL.AC.UK (GENSTAT@JISCMAIL.AC.UK)
Subject: Re: Procedure parameter question [SEC=UNCLASSIFIED]

Hi Andrew,

My work-around has been to use PARAMETER=dummy in the PROCEDURE directive, and to make the user supply the DATA explicitly as a pointer. This would mean specifying TYPE='pointer','text' instead of TYPE='variate','text' in the PARAMETER directive.

I expect you have thought of that but just want to make it work with DATA as a simple list. I will be interested to see responses to your question.

Regards
Murray.
********************************************************************************
Department of Economic Development, Jobs, Transport and Resources, Government of
Victoria, Victoria, Australia.

This email, and any attachments, may contain privileged and confidential
information. If you are not the intended recipient, you may not distribute or
reproduce this e-mail or the attachments. If you have received this message in
error, please notify us by return email.
********************************************************************************



To unsubscribe from the GENSTAT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=GENSTAT&A=1
Quote:
The contents of this e-mail are confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, disseminate, distribute or reproduce all or any part of this e-mail or attachments.  If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail.  Any opinion or views expressed in this e-mail are those of the individual sender and may not represent those of The New Zealand Institute for Plant and Food Research Limited.



To unsubscribe from the GENSTAT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=GENSTAT&A=1

Post generated using Mail2Forum (http://www.mail2forum.com)

Display posts from previous:  

All times are GMT
Page 1 of 1
Post new topic

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum