"have you changed your code so no a steal weel still qualifies for a straight?"
Yes.
As far as the PM goes, send them as you will, but I do appreciate if you can also share it with the forum. That is the whole idea why we are here, isn't?:smileylaugh:
Good Luck,
Haikuo
(*)
Hi Haikuo
A couple of years ago you were kind enough to help me with the problem below. I've come back to use the code again but when I copy and paste it I get an error when I run the code
data HANDS;
array c[5] $3;
array x[52] $3 (&HANDS.);
array i[5];
ARRAY NUM(5) num1-num5;
ARRAY FST(5) $ 1 fst1-fst5;
n=dim(x);
k=dim(i);
i[1]=0;
ncomb=comb(n,k);
do j=1 to ncomb;
call allcombi(n, k, of i
do h=1 to k;
c=x[i];
end;
%SIM
OUTPUT;
end;
KEEP C: RANK: num:;
run;
I thought this was to do with the dot so I replaced it with i[*] but I still get the same error, i.e.
ERROR: Illegal reference to the array i.
ERROR: Illegal reference to the array c.
Do you have any idea what might be causing this. I was able to figure it out before but I don't have a copy of my original code. It's probably something tiny but I just need to know what the dot was supposed to be.
Thanks
Matthew
Looks like some characters got garbled. The SAS syntax for applying a function to elements of an array is to use the OF keyword, like this:
OF i[*]
Thus the garbled line should be
call allcombi(n, k, of i[*]);
For an example (which uses ALLPERM instead of ALLCOMBI) see
Thanks Rick
I made that change but I'm still getting the errors above. the code worked perfect a couple of years ago.
I suggest you post your SAS log.
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.