atarionline.pl Nested IF/ENDIF custom macros in MADS - Forum Atarum

Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.

  • :
  • :

Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.

    • 1: CommentAuthorrudla
    • CommentTime24 Aug 2014
     
    Hi,

    I would like to make some macros, which would simulate nested IF/ENDIF.

    So something like this:
    IF_AT book, table
    IF_AT glasses, yourself
    SAY read_book
    PROGRESS
    END_IF
    END_IF


    To be able to nest the IF_AT, END_IF macros, I need some kind of stack. Maybe numbering labels would be enough (IF would increment number, ENDIF decrement).

    Did somebody do something like this using MADS? Any ideas?

    Thanks.