* OT: metapost question
@ 2005-03-28 19:54 Gerben Wierda
2005-03-28 20:12 ` Taco Hoekwater
0 siblings, 1 reply; 3+ messages in thread
From: Gerben Wierda @ 2005-03-28 19:54 UTC (permalink / raw)
Is it ok in a .mp file to do something like
for k=1 step 1 until N:
beginfig(k);
% some stuff
endfig;
endfor;
Thanks,
G
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OT: metapost question
2005-03-28 19:54 OT: metapost question Gerben Wierda
@ 2005-03-28 20:12 ` Taco Hoekwater
2005-03-28 22:21 ` Nikolai Weibull
0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2005-03-28 20:12 UTC (permalink / raw)
Gerben Wierda wrote:
> Is it ok in a .mp file to do something like
>
> for k=1 step 1 until N:
> beginfig(k);
> % some stuff
> endfig;
> endfor
Sure, why not? Simply try this, which shows that it works fine:
N := 100;
for k=1 step 1 until N:
beginfig(k);
drawdot (100,100) withpen pencircle scaled k;
endfig;
endfor;
end.
bye, Taco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OT: metapost question
2005-03-28 20:12 ` Taco Hoekwater
@ 2005-03-28 22:21 ` Nikolai Weibull
0 siblings, 0 replies; 3+ messages in thread
From: Nikolai Weibull @ 2005-03-28 22:21 UTC (permalink / raw)
* Taco Hoekwater (Mar 29, 2005 00:10):
> N := 100;
> for k=1 step 1 until N:
> beginfig(k);
> drawdot (100,100) withpen pencircle scaled k;
> endfig;
> endfor;
> end.
Wow, I never realized that. Man, I really gotta try to remember what
can be done with macro processors...,
nikolai
--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: minimalistic.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-28 22:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-28 19:54 OT: metapost question Gerben Wierda
2005-03-28 20:12 ` Taco Hoekwater
2005-03-28 22:21 ` Nikolai Weibull
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).