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
Util_GetTypeLength
(Review-Manager Utilities)


Vytvořeno: 12-13-1999 12:12:40
Poslední změna: 12-10-2002 11:21:41

Returns the length for a string data type. e.g. returns 39 for the type "VARCHAR(39).

Modul

Module: Review-Manager Utilities

Zdrojový kód:

PROCEDURE Util_GetTypeLength(dType$,BYREF tLen%)
BEGIN

    //search for the left bracket
    pos%=instr(dType$,"(");
    
    IF pos% <> 0 THEN
        
        //truncate string up to the left bracket
        dType$=Right$(dType$,len(dType$)-pos%);
        
        //search for the right bracket
        pos%=instr(dType$,")");
        
        IF pos% <> 0 THEN
            //truncate string up to the right bracket
            dType$=Left$(dType$,pos%-1);
            
            //convert string in to numeric value
            tLen%=val(dType$);
        ELSE
            //right bracket not found -> Error -> Length is 0
            tLen%=0;
        END // IF
        
    ELSE
        //left bracket not found -> Error -> Length is 0
        tLen%=0;
    END // IF
    
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\39824235.htm (C) microTOOL GmbH 2002