Informační tok Funkční structura Datová struktura ER model Modulová struktura Typová struktura Relační model Dokumentace


[Celkový datový model] [Funkce] [Externí rohraní] [Stavové diagramy] [Datové elementy] [Entity] [Relace]
[Databáze] [Události] [Materiály] [Generovací funkce] [Vyhodnocovací funkce] [Konfigurace] [Uživatelé] [Projekt] [Home]



Vyhodnocovací funkce
TestIMPCond
(Implementation Tree)


Vytvořeno: 12-08-1995 18:47:16
Poslední změna: 12-04-2002 10:33:29

Auxiliary function: Determines whether condition elements of the specified implementation tree are arranged in a formally correct way.

Modul

Module: Implementation Tree

Zdrojový kód:

PROCEDURE TestIMPCond(Mod$, FNo%, Type$, XCoor%, PPage%, PNo%, Level%, BYREF Result%)
BEGIN

    Result%=0;
    highLevelDirection%=0;
        
    IF PPage% <> 0 AND PNo% <> 0 THEN
        // search for left neighbours
        X%=XCoor%-71;
        WHILE result% = 0 AND Level% <> 1 AND X% >= 2 DO
            FOREACH Implbox WHERE Module=Mod$
                            AND Funcdefno=FNo%
                            AND Parentpage=PPage%
                            AND Parentno=PNo%
                            AND X=X% DO
                IF Boxtyp = Type$ THEN
                    result%=1;
                ELSIF Boxtyp = "em" THEN
                     // lower level
                    CALL TestIMPCond(Mod$, FNo%, Type$, 570+71, Page, Boxno, -1, result%);
                    IF result% = 0 THEN
                        result%=2;
                    END
                ELSE
                     highLevelDirection%=1;
                END
                BREAK;
            END
            X%=X%-71;
        END
        IF result% = 2 THEN
            result%=0;
        END
        
        // search for right neighbours
        X%=XCoor%+71;
        WHILE result% = 0 AND Level% <> 2 AND X% <=570 DO
            FOREACH Implbox WHERE Module=Mod$
                            AND Funcdefno=FNo%
                            AND Parentpage=PPage%
                            AND Parentno=PNo%
                            AND X=X% DO
                IF Boxtyp = Type$ THEN
                    result%=1;
                ELSIF Boxtyp = "em" THEN
                    // one level deeper
                    CALL TestIMPCond(Mod$, FNo%, Type$, 2-71, Page, Boxno, -1, result%);
                    IF result% = 0 THEN
                        result%=2;
                    END
                ELSE
                    highLevelDirection%=highLevelDirection%+2;
                END
                BREAK;
            END
            X%=X%+71;
        END
        IF result% = 2 THEN
            result%=0;
        END
        
        IF result% = 0 AND Level% <> -1 AND highLevelDirection% <> 3 THEN
            // if father is of Boxtyp = "em"
            FOR Implbox WHERE Module=Mod$
                        AND Funcdefno=FNo%
                        AND Page=PPage%
                        AND Boxno=PNo%
                        AND Boxtyp="em" DO
                // search at higher level
                Level%=highLevelDirection%;
                CALL TestIMPCond(Mod$, FNo%, Type$, X, Parentpage, Parentno, Level%, result%);
            END
        END
    END
END


Generováno: 16.10.2003 7:41 Systém: C:\Documents and Settings\hajsman\Dokumenty\Vyuka\Irs2\Projekt case40\Projekt03.csf Generováno systémem case/4/0
Vygeneroval: Administrator Soubor: C:\Documents and Settings\hajsman\Dokumenty\Vyuka\Irs2\Projekt case40\html\13000.htm (C) microTOOL GmbH 2002