process status is missing

Issue #52 open
Benjamin Hoffmann created an issue

The status local variable is missing in PixTudio :

if(process_id.status == status_frozen)

Error : error: Unknown identifier ( error in token: "STATUS" ).

Comments (4)

  1. Joseba Echevarria García repo owner
    • changed status to open

    Thanks for reporting. I'm reopening this since it's an unwanted deviation from BennuGD but for now and as a workaround you can use get_status, yes.

    The following example replicates the issue:

    import "mod_proc"
    import "mod_key"
    import "mod_video"
    import "mod_say"
    
    Process test()
    Begin
        LOOP
            FRAME;
        end;
    end
    
    Process main()
    Private
        int pid=0;
    Begin
        pid = test();
    
        while(!key(_esc))
            FRAME;
        end;
    
        say(pid.status);
    
        let_me_alone();
    end
    
  2. Joseba Echevarria García repo owner

    The following code does work, too:

    import "mod_proc"
    import "mod_key"
    import "mod_video"
    import "mod_say"
    
    Process test()
    Begin
        LOOP
            FRAME;
        end;
    end
    
    Process main()
    Private
        int pid=0;
    Begin
        pid = test();
        signal(pid, S_FREEZE);
    
        while(!key(_esc))
            FRAME;
        end;
    
        say(pid.reserved.status == status_frozen);
    
        let_me_alone();
    end
    
  3. Log in to comment