Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
proc (1) = minpr(x);
local d,m,i,minx;
i = 1;
m = 1;
d = x[1];
do while i <= rows(x);
if x[i] < d;
d = x[i];
endif;
i = i+1;
endo;
i = 2;
do while i <= rows(x);
if d == x[i];
m = i;
goto stops;
endif;
i = i + 1;
endo;
stops:
retp(m);
endp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment