|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Was hoping someone can me, does anyone know what programming
language this looks like: @p @t\4@>@<Declare the procedure called |solve_choices|@>@; procedure make_choices(@!knots:pointer); label done; var @!h:pointer; {the first breakpoint} @!p,@!q:pointer; {consecutive breakpoints being processed} @<Other local variables for |make_choices|@>@; begin check_arith; {make sure that |arith_error=false|} if internal[tracing_choices]>0 then print_path(knots,", before choices",true); @<If consecutive knots are equal, join them explicitly@>; @<Find the first breakpoint, |h|, on the path; insert an artificial breakpoint if the path is an unbroken cycle@>; p:=h; repeat @<Fill in the control points between |p| and the next breakpoint, then advance |p| to that breakpoint@>; until p=h; if internal[tracing_choices]>0 then print_path(knots,", after choices",true); if arith_error then @<Report an unexpected problem during the choice- making@>; end; Thanks!=) |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
comp.programming.
|
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Mikhail Kovalev wrote:
> Was hoping someone can me, does anyone know what programming > language this looks like: > > @p @t\4@>@<Declare the procedure called |solve_choices|@>@; > procedure make_choices(@!knots:pointer); > label done; > var @!h:pointer; {the first breakpoint} > @!p,@!q:pointer; {consecutive breakpoints being processed} > @<Other local variables for |make_choices|@>@; > begin check_arith; {make sure that |arith_error=false|} > if internal[tracing_choices]>0 then > print_path(knots,", before choices",true); > @<If consecutive knots are equal, join them explicitly@>; > @<Find the first breakpoint, |h|, on the path; > insert an artificial breakpoint if the path is an unbroken cycle@>; > p:=h; > repeat @<Fill in the control points between |p| and the next > breakpoint, > then advance |p| to that breakpoint@>; > until p=h; > if internal[tracing_choices]>0 then > print_path(knots,", after choices",true); > if arith_error then @<Report an unexpected problem during the choice- > making@>; > end; > > Thanks!=) This looks like Knuth's literate programming language. It is a way of writing the documentation AND the program. A preprocessor separates the code from the Pascal and generates a compilable program, and another preprocessor formats the code. Code is processed by numbered blocks, for instance above > @<Other local variables for |make_choices|@>@; refers to a block where all those variables are defined. This allows the code design from a top down manner. To get more information google for "Literate programming" "web" and "tangle", or look at the papers by Knuth on literate programming. -- jacob navia jacob at jacob point remcomp point fr logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
In article <726c0b5a-d8e4-4387-88c8-ba87fac0843c@e1g2000hsh.googlegroups.com>,
Mikhail Kovalev <mikhail_kovalev@mail.ru> wrote: >Was hoping someone can me, does anyone know what programming >language this looks like: >@p @t\4@>@<Declare the procedure called |solve_choices|@>@; >procedure make_choices(@!knots:pointer); Possibly MetaPost ? -- "Any sufficiently advanced bug is indistinguishable from a feature." -- Rich Kulawiec |
|
![]() |
| Outils de la discussion | |
|
|