For/Next – Vorgabe Step? Syntax?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #180011 quote
    Rainer (RFW)
    Participant
    Senior

    Liebe PRTler,
    irgendwo habe ich gesehen, dass in der For/Next Schleife auch die Step-Größe vorgegeben werden kann, jedoch komme ich nicht auf die korrekte Syntax?

    X = 100
    Y = 0
    For i = X DownTo Y Do  // Syntax Step ?
    // Something....
    Next

    Ggf. kann mir mal jemand Bitte einen Tip geben.
    Vielen Dank vorab und liebe Grüße
    Rainer

    #180016 quote
    Nicolas
    Keymaster
    Master

    Es ist nicht möglich, den Schritt einer FOR/NEXT-Schleife zu ändern, verwenden Sie stattdessen eine WHILE/WEND-Schleife, Beispiel unten:

    X = 100
    Y = 0
    while x >= Y do // Syntax Step ?
     // Something....
     drawhline(x)
     x = x - 10
    wend
    
    return 
    Rainer (RFW) thanked this post
    #180018 quote
    Rainer (RFW)
    Participant
    Senior

    Das hilft mir auch. VIELEN DANK!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

For/Next – Vorgabe Step? Syntax?


ProBuilder Support

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Rainer (RFW)
4 years, 3 months ago.

Topic Details
Forum: ProBuilder Support
Language: German
Started: 10/20/2021
Status: Active
Attachments: No files
Logo Logo
Loading...