REP or LOOP directive

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

REP or LOOP directive

Post by djes »

Some guys asked on the french forum for a way to have multiple includebinary. I suggested them to ask for a directive to do loops, like the REP directive in fasm : http://flatassembler.net/docs.php?article=manual#2.3.5
For example :

Code: Select all

  REPT 4 counter
    MY_LABEL%counter: IncludeBinary "file%counter.png"
  ENDREPT
Result :

Code: Select all

MY_LABEL1: IncludeBinary "file1.png"
MY_LABEL2: IncludeBinary "file2.png"
MY_LABEL3: IncludeBinary "file3.png"
MY_LABEL4: IncludeBinary "file4.png"
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: REP or LOOP directive

Post by luis »

djes wrote:I suggested them to ask for a directive to do loops, like the REP directive in fasm
+0.5

That would be cool :-)
Post Reply