[texworks] Feature/enhancement request

Philip Taylor (Hellenic Institute) P.Taylor at Hellenic-Institute.Uk
Sun May 1 19:49:25 CEST 2022

On 01/05/2022 18:30, Philip Taylor (Hellenic Institute) wrote:
> OK, many thanks for the suggestion.  I shall give it some thought.
It looks as if CMD's FOR command plus ECHO might be what is needed.  
Something along the lines of

> FOR /F "skip=1 tokens=1* " %i in (bowls-rr.ta68) do @echo %i %j
which yields (for a noddy program with a leading pragmat)

> # ================================================================
> This program attempts to find one or more solutions to scheduling a 
> multiple round-robin bowls tournament
> ================================================================ #
> INT number of teams, number of rinks, number of dates;
> print ("Number of teams: "); read (number of teams);
> INT number of matches = number of teams ^ 2 - number of teams;
> print (("Each round will require ", number of matches, " matches.", 
> newline ));
> print ("Number of rinks: "); read (number of rinks);
> INT number of days = number of matches OVER 4;
> print (("Number of days required for one round: " , number of days, 
> newline));
> print ("Number of dates: "); read (number of dates);
> INT number of rounds = number of dates OVER number of days;
> print (("With the constraints given, there can be a maximum of ", 
> number of rounds, " rounds", newline))
It has dropped the blank lines in the original, but the remainder 
appears as typed, /sans/ leading pragmat.

/** Phil./

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texworks/attachments/20220501/b452a323/attachment.html>

More information about the texworks mailing list.