|
Toby,
I really don't know what Kumar is trying to do, but I do know what the code
does.
The values in the PCTS array are compared to the numbers 3, 4, and 5. The
values of the OUTREP_GOOD, OUTREP_VGOOD, and OUTREP_EXCEL arrays are set to
1 (true) or 0 (false) based on the comparisons with the values in the PCTS
array.
Hope this helps,
Ed
Edward Heaton, SAS Senior Systems Analyst,
Westat (An Employee-Owned Research Corporation),
1600 Research Boulevard, RW-3541, Rockville, MD 20850-3195
Voice: (301) 610-4818 Fax: (301) 610-5128
mailto:EdHeaton@Westat.com http://www.Westat.com
-----Original Message-----
From: Dunn, Toby [mailto:tdunn@TEA.STATE.TX.US]
Sent: Tuesday, May 18, 2004 5:41 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: arrays and do loops
Well as Ron just pointed out I screwed up with my _n_ answer, alas I had
a mental failure....
But after review I have to ask what the heck is Kumar after here?
do i = 1 to n;
outrep_good(i) = pcts(i) = 3;
outrep_vgood(i) = pcts(i) = 4;
outrep_excel(i) = pcts(i) = 5;
end;
I am still puzzled by the three statements in the do loop.
Looks like Ron just beat me to posting this on the list but what the
heck.
Toby Dunn
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Fehd, Ronald J. (PHPPO)
Sent: Tuesday, May 18, 2004 4:26 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: arrays and do loops
> From: Gerard [mailto:brian_boru@ATT.NET]
> I'm having a problem with the following:
>
> array pcts 4 out_a out_b out_c out_d;
> array outrep_good 4 out_a out_b out_c out_d;
> array outrep_vgood 4 out_a out_b out_c out_d;
> array outrep_excel 4 out_a out_b out_c out_d;
the above array descriptions are for implicit arrays
the below array usages in the algorithm
are for explicit arrays.
declaration of implicit array using I as counter
> array outrep_excel(i) 4 out_a out_b out_c out_d;
explicit, any integer as counter
> array outrep_excel (*) 4 out_a out_b out_c out_d;
> do i = 1 to n;
> outrep_good(i) = pcts(i) = 3;
> outrep_vgood(i) = pcts(i) = 4;
> outrep_excel(i) = pcts(i) = 5;
> end;
> As soon SAS hits the first line of the do loop, I get an
> error message that says array subscript out of range.
which means your data structure declarations
don't agree with their use in the algorithm
> I've tried everything I can think of.
> Another problem I have is that whenever I post a message
> to this group, it fails to appear.
your subscription is set norepro:
Subscription options for list SAS-L:
NOREPRO You do not receive a copy of your own postings
NOACK No acknowledgement of successfully processed postings
> The only help I've gotten has been from people kind
> enough to email me. Any thoughts?
> Once again I can't thank you folks enough for your kind help.
we're the merry band of SAS-L!
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
remember perspective: the error is not always where it seems to occur!
-- RJF2
Your task is simple: remove the difference
between how things should be
and how they really are.
-- Ashleigh Brilliant pot-shot #4247
RTFM: I'm an engineer, I don't get paid to know,
I get paid to know where to look it up.
RTFM: Read The Finite Manual.
|