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
Check_Refinements
(Function Structure)


Vytvořeno: 12-11-1995 11:26:37
Poslední změna: 12-05-2002 11:08:53

Outputs a list of all elements whose refinements are formally incorrect. The list is grouped by element types functions and blocks.

Modul

Module: Function Structure

Zdrojový kód:

PROCEDURE Check_Refinements FOR FUNCTIONSTRUCTURE
BEGIN
/*
  check refinements; print name of elements with only one child element
*/

  PRINT {"ARIAL",12,BOLD} "Test větvení funkční struktury ";
  PRINT {"ARIAL",12,BOLD,ITALIC} CONV$(Functionstructure.Boxname),NL(2);

  first%=0;
  found%=0;
  // Funktionen
  FOREACH Func WHERE Func.Fsd=Functionstructure.Name DO
  // Func.Function<>Functionstructure.Name DO
    children%=0;
    FOREACH Func AS F WHERE F.Fsd=Func.Fsd
                      AND F.Pfuncno=Func.Funcno
                      AND F.Ppage=Func.Page DO
      children%=children%+count();
      BREAK;
    END
    FOREACH Cond AS C WHERE C.Fsd=Func.Fsd
                      AND C.Pfuncno=Func.Funcno
                      AND C.Ppage=Func.Page DO
      children%=children%+count();
      IF Cond="lo" OR Cond="st" OR Cond="it" OR Cond="re" THEN
        children%=children%+1;
      END
      BREAK;
    END
    FOREACH Part AS P WHERE P.Fsd=Func.Fsd
                      AND P.Pfuncno=Func.Funcno
                      AND P.Ppage=Func.Page DO
      children%=children%+count();
      BREAK;
    END
    FOREACH Block AS B WHERE B.Fsd=Func.Fsd
                       AND B.Pfuncno=Func.Funcno
                       AND B.Ppage=Func.Page DO
      children%=children%+count();
      BREAK;
    END
    IF children% = 1 THEN
      FOR Function WHERE Function.Name=Func.Function DO
        found%=1;
        IF first% = 0 THEN
          PRINT {BOLD,"ARIAL",10} "Neúplná větvení:",NL;
          first% = 1;
        END
        PRINT {"ARIAL",10,ITALIC} TAB(4),CONV$(Function.Boxname);
        PRINT {"ARIAL",10} TAB(35),"(funkce)",NL;
      END
    END
  END

  // Blocks
  FOREACH Block WHERE Block.Fsd=Functionstructure.Name DO
    children%=0;
    FOREACH Func AS F WHERE F.Fsd=Block.Fsd
                        AND F.Pblockno=Block.Blockno
                        AND F.Ppage=Block.Page DO
      children%=children%+count();
      BREAK;
    END
    FOREACH Cond AS C WHERE C.Fsd=Block.Fsd
                        AND C.Pblockno=Block.Blockno
                        AND C.Ppage=Block.Page DO
      children%=children%+count();
      BREAK;
    END
    FOREACH Part AS P WHERE P.Fsd=Block.Fsd
                        AND P.Pblockno=Block.Blockno
                        AND P.Ppage=Block.Page DO
      children%=children%+count();
      BREAK;
    END
    FOREACH Block AS B WHERE B.Fsd=Block.Fsd
                         AND B.Pblockno=Block.Blockno
                         AND B.Ppage=Block.Page DO
      children%=children%+count();
      BREAK;
    END

    IF children% =1 THEN
      found%=1;
      IF first% = 0 THEN
        PRINT {BOLD,"ARIAL",10} "Neúplná větvení:",NL;
        first% = 1;
      END
      PRINT {"ARIAL",10,ITALIC} TAB(4),CONV$(Block.Boxname);
      PRINT {"ARIAL",10} TAB(35),"(blok)",NL;
    END
  END

  IF found%=0 THEN
    PRINT {"ARIAL",10} TAB(4),"Žádné formální chyby větvení.",NL;
  END
  PRINT NL;

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\17579.htm (C) microTOOL GmbH 2002