03.06.2010

-    Windows 7.
-  .    MS SQL Server 2008.

21.05.2010

-     EXE   DEP  Win 2008 r2, Win 7.

06.05.2010

- ., ,         .
-        .

26.01.2010

-    /      -    MS Excel (HTML).
       - /blnexportexcelhtml  .

-        (OnOutput).
        - , 
        .

  :
    func OnOutput(FieldName: String; Iter: Integer; Value: *): String;
  :
    
  :
    - FieldName -    
    - Iter -  /    
    - Value -    

  ! 
       ,  -   (, ), 
       .  ,      
    ,    ,       
   . 
       ,    . 
             -  
   ,   .

-  ,     6.9     , 
       .

17.01.2010

-       1-  2006 .

15.01.2010

-          ,     .

- . / .     , .   TBW.INI:
   [License]
   Number= ...      --   
   Number<xxxx>=... --   , : <xxxx> - HEX  

- .         15.01.2010.

23.12.2009

-              .
- . / .       01000F.

-         .
   :
     GetFileList(aFolderName, aMask :String; aMode :Integer; var aFiles[] :String);
   :
     
   :
     aFolderName -    ,     
     aMask -     '*' (   , 
                  )  '?' (  ); 
             , "*.txt" -       
             "??.*" -          , 
                "",      2 ;
                  ,  ";".
     aMode -    ,   ; 
                       (0), 
                   ,  ; 
                  FindOnlyFiles  FindOnlyFolders, 
                , ,   ,   ; 
                   ;
                 RecursiveFind,      .
     aFiles -  ,     . 
                   .
   :
     --       D:\Download
     GetFileList('D:\Download', '*.*', 0, vFiles);
     
     --         D:\Download   
     GetFileList('D:\Download', '*.*', RecursiveFind, vFiles);

     --      D:\Download
     GetFileList('D:\Download', '*.txt', FindOnlyFiles, vFiles);

     --       D:\Download   
     GetFileList('D:\Download', '*.txt', FindOnlyFiles + RecursiveFind, vFiles);

     --       D:\Download   
     GetFileList('D:\Download', '*.*', FindOnlyFolders + RecursiveFind, vFiles);

     --         D:\Download   
     GetFileList('D:\Download', '*.txt;*.doc', FindOnlyFiles + RecursiveFind, vFiles);

     for i := 1 to LengthOfArray(vFiles) do
       ...
     end;

-   6.9 /          .
      .

-  .        Match(Str(<Field>), '???')

10.06.2009

-         ""  "".

-   .

04.06.2009

-   6.9          . 
          .
    ,       .
             .
      ,    ,    
      .       . 
       ,    ,   .
             , 
       .   .

-   "   ..."   ,   6.9      .

-   .

-           " "      "".

-   ,      ""  ,    " "  ""   "    ".

03.04.2009

-   "   "   ,       ,   ,    .
-       ( )         30 ,   ...
-   .

-      .
   :
     LicenseCheckDateLimit(aProd :Integer) :Date;
   :
     
   :
     aProd -   
       .
    ,        ( LicenseCheck()=0 ),    1.1.100.
   :
     Proc CheckLicenseExample;
       var vDate :Date;
       var vDays :Integer;

       if LicenseCheck(51) > 0 then
         vDate := LicenseCheckDateLimit(51);
         if vDate = 1.1.100 then
           Trace('    ...');
         else
           vDays := vDate - ToDay;
           if vDays >= 0 then
             if vDays > 30 then
               Trace('  ...');
             elseif vDays = 0 then
               Trace('    ...');
             else
	       Trace('     ' + Str(vDays) + ' ...');
             end;
           else
	     Trace('   ...');
           end;
         end;
       else
         Trace('   ...');
       end;
     end;

-    TBLicense.dll, .       .
-        MS SQL Server 2005.

30.09.2008

-    /        MS Excel (HTML)    "  ".
-   ExportBlank     .
  :
    ExportBlank(Format :Integer; Blank :String; File :String [;SaveColor :Logical [;AsPrint :Logical]]);
  :
    AsPrint -     .    True,        "  ".
                : ieRTF, ieWord, ieExcel_HTML.
  :
    ieExcel_HTML -    *.html   MS EXCEL.

12.09.2008

-   , .      Input      (Alt+R).

-  ,         ,      .
-      ,    ,      "" ,  ,       .

14.07.2008

-   .

16.06.2008

-           ,      .

02.04.2008

-         6  (FFFFFF).
-     01000F

-          .

13.03.2008

-          2.5
-    Senselock.
-       9.

-     Up(''), Lo('').

29.12.2007

-       .
-    /    "  "   .

-      CellLinesCount.

03.09.2007

-   -        ,  ,   . .
   :
       [ :  ! ]  (, ,  , , , ) --  
   :
      -    False,   ,    -      .
        True,   ,    -       . 
        ,  -    .
   :
     :  {10!|40!|41!\90!}  --
     1 --1

       (,,,,'GroupAttr = 0') --    
      1 (,,,,'GroupAttr = 0', True)   -- 1   

     vSign := CardFileRecSign('', '', '',  {43});
     Trace(vSign); -- .00041.00043

     vSign := CardFileRecSign('', '', '1', {43});
     Trace(vSign); -- 1.00043

-               " MS Windows".
-     Round,            .
-   AV        .
-          .

29.06.2007

-             MS SQL Server   " MS Windows". 
    .          ,       .

08.06.2007

-  .         MS SQL        SQL-  .          .
-    ,      ,            SQL-  .
-         MS Windows Server 2008.

-    .,       PDOXUSRS.NET,      MS Windows Vista, 2008      User Account Control.

03.04.2007

-     GetTransFromTextJur.

-        (_). 
            ,        .
     ,                 .
  :
    _
    50!|52!|55!|57!|58!|66!|67!'EUR'USD : 91.1 {.0911.} / 91.2 {.0912.}
              91.1  91.2    
        .

31.01.2007

-    ,            Enter  - ,        ,  .   .

07.12.2006

-   " /  "   "  ".    ,      Word  RTF   "  ".
-       .
-  ./      .
-   .       : /Key=Server. 
        .           ,     ..         .
           .,         .  .   .

-   "   "  .     .
-    ,    /  ,        .-   .
-   "List index of bound", .       ,        . 
         .         , , .
-   AV   DeleteFromArray,      .

30.08.2006

-  ./      .
-           :
  -   /    -    ,        ()  
  -     -    ,         ,     .
  -    /     -    ,     ()      "".
      .
-        "      ".
       ,    (.BRO)   .
-        .      ,       .
   ,     .   .
-       :
   - "      .    .    .   ."
   - "      .    ."
-   InsertFrame  ,    ,   .
-  .      HKEY_LOCAL_MACHINE\SOFTWARE\DIC\TBW\6.9\Server\Configuration\GlobTbwSet_Server
    "ServerSQLExprAsync".  ,   .   ,   SQL-   ExecuteSQL, OpenWorkAreaSQL 
          .      
     ,  SQL-    . 
      SQL-    ,      . 
    "UPDATE"   . "SELECT"    "WITH (NOLOCK)".

-     __.   ,      ,     .      ,     ,          .
-  ,             .
-     OpenCardFile   .  ( "--"  ),      , 
   UKey          . 
    -   , ..       
       ,     .
-    .,      tbw.lic.
-         180 .   .

03.07.2006

-     .
-      "  "  ,    " ": "    ".
      " "    "  "   :
  -   : "          ";
  -   : "          ".

-      _,     ,     .     .
-     ,  .    Freeze      .
-     ProgressPos,     ""     ,      Finally.
-     ,         , . . .

14.06.2006

-  .       5D709  .      ,             .
-      ,          .
-  .      .
-   " "   "      " (, , , ).   .
-              :
  - "-70"  "-25"
  - " "  "-25"
- ,         : ChooseSaveFile, : .      ChooseFile.
-   PickCorrAccount       .
  :
     PickCorrAccount(aAccount: String; ByDebet: Logical [aPosition: String]): String;
  :
     aPosition -  ,        . 
                    ,       ""    . 
                    ,           .
-     495  499      157.
-    ,      "    ...",   "  "        .
-  .           ,     .
-   .         .

-       LinuxXP     .      .
-    ,    ,      .
-    .      100       ,            30   Records      ,
      .   -    DeleteAllRecords,      BeginChanging.      ,       .
-     RecSignsCount -        .
-      ,         "  "   .
-  ,         2-     "     ",       . 
-     ,               .
-   AV, .  ,       " (F9)",       .
-     FracToInteger.
-     GetVariable*, PutVariable*,        , .       USES.
-     ,       "    ",    .
-  ,         /     .
-    .    ,    ,     ,  .      .
-    .        ,        .
-    -,     .
-     AlternateTree      ,    .
-     Template.Field,          (Template.Name).
-           -        .
-    -   .
-      ,               .

20.04.2006

-      .
  :
    OpenTextJur(aFileName: String); : 
  :
    aFileName -      .
     .        .
   
  :
    CloseTextJur;  - 
     , .    OpenTextJur.

  :
    GetTransFromTextJur(aDate: Date; aSum1: Numeric; aVal1: String; aSum2: Numeric; aVal2: String; aDeb: String; aCre: String; aAna[]: String; aComment: String): Logical;
    : 
  :
    aDate -   ,  .    
    aSum1 -   ,  .     .
    aVal1 -   ,  .      (aSum1).    -     .
    aSum2 -   ,  .     .
    aVal2 -   ,  .      (aSum2).    -     .
    aDeb  -   ,  .    .
    aCre  -   ,  .    .
    aAna  -   ,  .    .       . 
               ,      ":".
    aComment -   ,  .     .
            .    .  True,      .
   :
     var vAna[]: String;

     Proc ParseTextJur(Sender: String);
     var i, j: Integer;
     var vFile: String;
     var vDate: Date;
     var vSum1, vSum2: Numeric;
     var vVal1, vVal2: String;
     var vDeb, vCre: String;
     var vComment: String;

     if ChooseFile(vFile, ' ') <> cmOk then
       Exit;
     end;

     OpenTextJur(vFile);
     try
       while not GetTransFromTextJur(vDate, vSum1, vVal1, vSum2, vVal2, vDeb, vCre, vAna, vComment) do
         i := i + 1;
         Trace(Str(i) + ' - ' + DateToString(vDate));
         Trace('  ' + vDeb + ' - ' + Str(vSum1, 2) + ' - ' + vVal1);
         Trace('  ' + vCre + ' - ' + Str(vSum2, 2) + ' - ' + vVal2);
         Trace('  ' + vComment);
         for j := 1 to LengthOfArray(vAna) do
	   Trace('  ' + vAna[j]);
         end;
       end;
     finally
       CloseTextJur;
     end;
     Trace(Format(' %d ...', i));
   end;

-     GetCardFileNames,      , .    .
-         .           Template.Field
-   AV  .   RefreshCard,   .    .
-   AV  .      (),   .    .
-    Template.Freeze,    ,       .
-     .Row,  RowTop.        .
-    Template.Freeze   " "  " ".         .
-      .         .

04.04.2006

-   " "     ,     .
           /   , 
  ,  .              
           ( /   ),
   ,   ""         .
     ()   -   ( )  
    .
    "  "      Ctrl+Q, T. 
    ,         ,
       ,        ...
    ,          Ctrl+Q, T       .

-    Template (),   Freeze(x,y).       "  " ( )  .
  :
   Template.Freeze(220,100); --     22  10;
         -     ..

-     Column()   ColLeft.      ,     0  .
  :      
   var X: Integer ;
   X = AsInteger(Sect1.Column(3, ColLeft,''));
   --    X -  3    Sect1;
-     Row()   RowTop.      ,     0  .
  :      
   var Y: Integer ;
   Y = AsInteger(Sect1.Column(3, RowTop,'')); --    Y -  3    Sect1;


-  .   :
   AccIsActive   
   AccIsPassive  
   AccIsActPas   
   AccIsZero     

- , .    .
  :
    GetCardFileFieldComment(aCardFileName: String; aFieldName: String): String; : 
  :
    aCardFileName -    
    aFieldName -      .
             Tables.mtl.

-   PutVariable*, GetVariable*        -     .
   ,     .
  :
    PutVariableI('.....[1].', 123);

-           .,          .
-                .
-   " "   "    BLANKS.DBT".  ,  .
      BLANKS.DBT - ,         ,     .

-   Invalid variant type conversion       .
-     IsAccActive.
-     InsertInArraySort,        .
-     ,      -     .
-        .        .      ""      .
-       ,        "".
-      ()   Runtime ...

13.03.2006

-   ,                "  ", "".
-   ,    ,    , ..    ,      : "", "  ", " ", "".
-  " /  ".    "  ".            ,       :
  - ""  -       . 
  - "" -       . 
  - " " -   ,      ,     ,       .
-       , .  ,     .
  ,    - Dates[]: Date;    : #Dates[1]  #Dates[vIndex],               .
-   "  "   , ..    ,  ,           "".
-  .    .
-   DownloadInternetFile          .
-   DeleteFromArray   .
  :
    DeleteFromArray(aNameArray: *; aIndex: Integer[; aDoRaise]);
  :
    aDoRaise -    False,     ,  ,   .
                 ,      True.
  :
    var vStrArray[]: String;
    ...........
    ClearVariable(vStrArray);
    ...........
    DeleteFromArray(vStrArray, 15, False); --    ,   .

-           .
  :
    Bal_Line_Acc_Condition(aBalStr: String): String; : ___
  :
    aBalStr -   
        .
  :
  var vAccCondition: String;

    vAccCondition := Bal_Line_Acc_Condition('110'); -- 04|04.1|04.2|04.3|04.4|.01


-   TujReport    .
  :
    TujReport(<    > [; aSplit: Integer; aOpen: Logical): Integer;
  :
    aSplit -   ,    .    "  ". 
                  :
      - TujRepTurnDebCre () -       
      - TujRepCrossTurn () -   
      - TujRepBalAccount () -      
       
          (   )   :

      - TujRepNoNullBal () -    
      - TujRepZabalance () -   
      - TujRepCombinedAna () -   .

           .     "  ".
         ,      TujRepSrossTurn + TujRepCombinedAna. ???

    aOpen -   .     True,    .
  :
    vCount := TujReport('JUR2005.jur', 01.01.2005, 01.01.2006, '', '', '.1|.2*', '', '', TujRepSrossTurn, True); --     2005 .

-   TujReportBegin    .
  :
    TujReportBegin(<    > [; aSplit: Integer; aOpen: Logical);
  :
    aSplit - . TujReport
    aOpen  - . TujReport

-   TujReportEnd   .
  :
    TujReportEnd[([aOpen: Logical])];
  :
    aOpen  - . TujReport

-          .
  :
    GetCardFileNames(aMask: String; aCardFileNames[]: String; aSubTab: Logical; aComment: Logical; aRefTab: String): Integer;
  :
    
  :
    aMask -      (.  Match)
    aCardFileNames -  ,   
    aSubTab -  ,  True -        , . .    .
    aComment -  ,  True -          "--"     .
    aRefTab -     .    ,        .      .
    -  .   ,   .
  :
    var vCardFiles[]: String;
    var vCount: Integer;

    vCount := GetCardFileNames('', vCardFiles, False, Fasle, '');
    if vCount > 0 then
      vCount := Alternate(' ...', vCardFiles);
      if vCount > 0 then
        OpenCardFile(vCardFiles[vCount]);
      end;
    end;

-        .
  :
    Format(aFormat: String|LongString; <  >): String|LongString;
     -  ,      -  .

-      AsDate.
-   AV     -,    .
-         ,     ,       .
-     ,    ,                .
-      ,                 .
-       .   ,             ,     ,              .
-    .    ,      , . ,      .
-        " "         ,      -.
-           -  .
-     ,        .
-      GetCardFileFields,            .

10.02.2006

-       (Ctrl+S)   ,    (Ctrl+R)   "  ".
-          ,  .          ,       -   .
-  .     .    .
-        .
-       " "    Ctrl+A.
-         .  :
  - Shift + PageUp   -        ;
  - Shift + PageDown -        ;
  - Shift + Home     -       ;
  - Shift + End      -       ;

-  " ".   ""      .

-  "  "
  OnInsert/
  :
    func OnInsert(aSectName: String): Logical;
  :
    aSectName -        
  :
            ,    ,    .
        False,          .
          .
  :
    var 01_Max: Integer = 6;

     01(: ): ;
    var vRes: Logical;

      vRes := AsInteger(01.FrameCount) < 01_Max;

      if not vRes then
        Message(Format('   %d  .', 01_Max));
      end;

       vRes;
    end;

-  "  "
   OnInsert/   /      OnInsert/.
  :
    Section1.OnInsert := "01";

-    PrintCardBlank       - .
  :
    PrintCardBlank(aCardFileName: String | aBlankName: String; <  >
  :
    aBlankName -    - .

-       .
  :
    AddInArray(aArray[]: *; aSort: Logical; aDublicates: Logical; aValue1 [, .. aValieN]: *);
  :
    aArray -  
    aSort -  ,   .
    aDublicates -  ,       .
    aValue -   ,   .       .
        :
    AddInArray(vTestArray, False, True, 1, 2, 3, 4, 5);
             :
    AddInArray(vTestArray, False, False, 1, 2, 3, 4, 5);
        :
    SortArray(vTestArray);
    AddInArray(vTestArray, True, True, 1, 2, 3, 4, 5);
              :
    SortArray(vTestArray);
    AddInArray(vTestArray, True, False, 1, 2, 3, 4, 5);

-         .
  :
    ProcExists(aProcName: String): Logical; : , FUNCEXISTS, 
  :
    aProcName -      .      (..   ),    .  . .  . .
  :
    if ProcExists('') then --    
      ExecuteProc('');
    end;

    if ProcExists('._.') then --    
      ExecuteProc('._.');
    end;

-     .  ADO     .
-   AV, .    ,          .
-      Enquiry,     ^M  .
-      Print               .
-     " ",      ,     ,       0.
-      ,         / /     ,      .
-      DeleteFromArray,      ,       .
-  ,       -              ,     .
-      Print    ,      .
-     PrintCardBlank,       .     .
-     Print,            .
-    ,         .   .
-     "   "   -   ""   "".

20.01.2006

-        ""   ""    .
-   .      MS SQL       .              \WrkSrv.
-      : "", ". ", ". ", ". "        .
-            .
-        .
-   "  ",   ""    "  ,  ".
               ,    ..
      .         .
                    ,
            ,    .
-    Drag'n'Drop   MS Windows Shell  . ..    MS Windows        ,     .
-    - CardCurrentGroupUKey.   HierarchicalView = False,   CardCurrentGroupUKey  NIL.
-           .         .
-   " "   "     ".   . 
                 ,       .
        .  Win 9x    .

-        , .      .
  :
    CardFile ComVarName CardFileName(DateFieldName, ValueFieldName [,NameFieldName] , Filter) -- Comment
  :
    NameFieldName -      ,  .      .
                            ,        .   ComVarName.
                         ,          ComVarName      .
  :
    CardFile  (, , , ' <> ""')
  --         : "USD", "EUR",
  --          : ".USD", ".EUR".

-   SortSection       .
  :
    SortSection(aVarHandle: Handle | aSectionName: String; ... <  > ...
  :
    aSectionName -    .  ,            ,    .
  :
    var : ;
    ...
    proc (Row: Integer; Col: Integer; Double: Logical);
      SortSection('2', Col, , False);
       := not ;
    end;

-   ExportCard        .
  :
    ExportCard(aFormat: Integer; aCardName: String | aCardName[]: String; ... <  >
  :
     aCardName - ,    ";"    .
     aCardName -     .
   1:
    ExportCard(ieCrd, ';', '', False, False, False, True, False, False, False, False);
   2:
  var vTables[]: String;

  proc ExportManyCardFile;
    ClearVariable(vTables);
    vTables[1] := '';
    vTables[2] := '';
    ExportCard(ieCrd, vTables, '', False, False, False, True, False, False, False, False);
  end;

-       ,        (,   ) -       .
-        /        .
-     ,      ,          .
-     PutVariable*,         .
- c      . 
-     ImportCard,    ,    ovrNone.
-    ,               .
-      ,              -   .
-   AV  .,          ,        .
-     CopyArray  4- .
-     SortSection,      127 .
-     CreateFolder,     ,     .
-          " ",        .
-        MS SQL  ..
-         .

14.12.2005

-    ,  ""   "  -  ".  .           .    .
-  .  ,        .
-  .      " ",     ,      , .        .
-       ""      - ""
- .   ..   . .   .
-   " "  "       ".
-   " "  .     .
-                .
-     ,       " ".
         ,    " " (Alt+B)   " ".
          .
-            : , , .
-    \Bin    TBW.lic,       .
    :
    < >=< > [ -- <>]
  :
    < > -     .
-   "  "       /  ... 
          ,       :  , ,  ...
          .
          ,     CTRL  SHIFT.
               .
          ,   ,      
    :     " [] "
    :          
    :     .
     - "  ",       
         .

-            .      "PasswordEx",  "".
-      MS SQL Server      .
-   "   ..."  .      TBServer.TLB.
-  ., .    .
-  ., ., .    .

-         Print,          (   )   " ",  .     :
   -     
   -      
   ,    ,       (Print).   ,       .
   ,         Ctrl (    Ctrl+F7),      .       .
   ,         Shift (    Shift+F7),         (Print).       .
               .
        :
  proc ="  ";
    Print('');
  end;

-   IF()    LongString;

-        .
  :
    CloseEditor(aFileName: String; aSave: Logical): Logical; : .
  :
    aFileName -   .
    aSave -  True,       .
  :
         aFileName.  False,   ,     . .    OpenEditor.

-          .
  :
    FracToInteger(aValue: Numeric | String [; aPrec: Integer): Integer; : .
  :
    aValue -      .        ,    . 
    aPrec -  .  > 0,     .  < 0,            .
              = 0,     .    ,    = 0.
  :
    FracToInteger(123.456, 3);   --  456
    FracToInteger(123.456, 2);   --  45
    FracToInteger(123.456, 4);   --  4560
    FracToInteger(123.0456, 5);  --  4560
    FracToInteger(123.456);      --  456
    FracToInteger(-123.456, 2);  -- -45
    FracToInteger(123.456, -2);  --  23
    FracToInteger(123.456, -3);  --  123
    FracToInteger(123.456, -4);  --  123
    FracToInteger(-123.456, -2); -- -23
    FracToInteger("123.456", 0); --  456
    FracToInteger("123.456S");   --  0

-          .
  :
    GetBlankNames(aMask: String; var aBlanks[]: String; aSort: Logical; aWithNamed: Logical; aWithGroup: Logical): Integer; : .
  :
    aMask -     . (.  Match.)
    aBlanks -  ,    .
    aSort -  .  True,        .    ,    .
    aWithNamed -  .  True           ("--")     (.    " ").
    aWithGroup -  .  True,        , .  .
  :
          aBlanks[]      aMask.
          (- ).      .
   1:
   var vBlanks[]: String;
   var vCount: Integer;
   ...
     vCount := GetBlankNames('.*', vBlanks, True, False, False);
     if vCount > 0 then begin
       vCount := Alternate(' ...', vBlanks);  --    
       if vCount > 0 then  
         Trace(Format('  "%s", vBlanks[vCount]));
       end;					    
     end;
   2:
   var vBlanks[]: String;
   var vCount: Integer;
   ...
     vCount := GetBlankNames('.*', vBlanks, True, True, True);
     if vCount > 0 then begin
       vCount := AlternateTree(' ...', vBlanks, -1, -1, -1, '.', ' ', ''); --    
       if vCount > 0 then  
         Trace(Format('  "%s", vBlanks[vCount]));
       end;					    
     end;

-        .
  :
     VariableExists(aVarName: String): Logical; : 
  :
     aVarName -    .      ,      .   .
  :
       True,     .  ,  ,  .      .  ,       .

-        .
  :
     OpenTabJurnal(aRazdel: String; aUKey: Record): Logical; : .
  :
     aRezdel -      .      .   ,         ..
                            ,    . 
                            , .         ,     
                       ,    False.
     aUKey -  ,     .  NIL        , 
                   ,        .
    True,      .
  :
     var vOpened: Logical;

       vOpened := OpenTabJurnal('', nil);
       if not vOpened then
         --   .  - ...
       end;

-        / ().
  :
     WriteVarToCardFile (aCardName: String; aInVar: Logical; aBlankName: String; aBlankNameDst: String [; aBeginDate: Date; aEndDate: Date [; aBlankVersion: Integer; aVersion: Integer [; aUserName: String; aSchemaName: String]]]); : .
     ReadVarFromCardFile(aCardName: String; aInVar: Logical; aBlankName: String; aBlankNameDst: String [; aBeginDate: Date; aEndDate: Date [; aBlankVersion: Integer; aVersion: Integer [; aUserName: String; aSchemaName: String]]]); : .
  :
     aCardName     , / (/)  /;
     aInVar   ,   ""  /    ,       ;
     aBlankName     ,    / / (/).          /  .
                    ,          Blank.
     aBlankNameDst -        /   ,    aBlankName.          
                      /       aBlankName.
     aBeginDate, aEndDate -       .   ,          BeginDate, EndDate (  ).
                              ,     1.1.100 ( )  .   ,      ,   .
     aBlankVersion -        .   ,          BlankVersion (  ).
                       ,     0  .   ,      ,   .
     aVersion -        .   ,          VarVersion (  ).
                  ,     0  .   ,      ,   .
     aUserName -        ,  . /  .    . 
                  ,   ,          UserName (  ).
                   ,        .   ,      ,   .
                        UserName.
     aSchemaName -        ,  . /  .    . 
                  ,   ,          SchemaName (  ).
                   ,        .   ,      ,   .
                        SchemaName.
   :
      / .  /      , .    :
   TABLE DBT = "   ";
       BLANK        :STRING;     --  
       VARIABLE     :STRING;     --  
       VALUE        :STRING;     --  
       BEGINDATE    :DATE;       --    ()
       ENDDATE      :DATE;       --    ()
       BLANKVERSION :INTEGER;    --   ()
       VARVERSION   :INTEGER;    --   ()
       UserName     :String;     --   (,   )  
       SchemaName   :String;     --   (,   )
       GROUPDOC     :DBT(BLANK); --       ()
   ENDTAB;
     .     .    ,         .
   ..      ,        .
   1:   .    .
     WriteVarToCardFile("DBT", False, "", "");
   2:     .
     var vAlias: String;
       vAlias := AliasName("DBT");
     WriteVarToCardFile("DBT", False, "", "", 1.1.100, 1.1.100, 0, 0, UserName(vAlias), SchemaName(vAlias));
   3:        .
     WriteVarToCardFile("DBT", False, "", ".");
   4:         .
     ReadVarFromCardFile("DBT", False, "", ".");

-        .
  :
    ExecuteProc(aProcName: String [; aArg1: *..aArgN:*]); : 
  :
    aProcName -    .     .   ,      .
    aArg1..aArgN -     .
    * -  .     .
  :
    ExecuteProc('Button5_OnClick', '');

-        .
  :
    ExecuteFunc*(aFuncName: String [; aArg1: **..aArgN:**])***; : *
  :
    * -   D, R, L, S, I, N    .
    aFuncName -    .     .   ,      .
    aArg1..aArgN -     .
    ** -  .     .
    *** -  : Date, Record, Logical, String, Integer, Numeric    .
  :
    var vRes: String;

    vRes := ExecuteFuncS('vStr_OnType', 'aaa', 1, 2, 3, 'Oops...');

-        Frame.          .
  :
    Template.Name = "1"; --   .
    Template.Field = "1"; --  Field       .
    Template.Frame = 2; --   ,           .
  ..  Frame,    ,    Field!

-  Current     .

-          ,  - .
  :
    GetVariable*(aVarName: String):**; : *
  :
    * -   D, R, L, S, I, N   .
    ** -  : Date, Record, Logical, String, Integer, Numeric.
    aVarName -    .     ,      .
                -     .
  :
          . 
          ,          .
  :
     var vVarName: String;
     var vVarValue: Numeric;

     ClearVariable();
     for i := 1 to GetVariavleI('..') do
       vVarName  := Format('..[%d]', i);
       vVarValue := GetVariableN(vVarName);
       vVarName  := Format('..[%d]', i);
       [GetVariavleI(vVarName)] := vVarValue;
     end;

  :
    PutVariable*(aVarName: String; aValue: **); : *
  :
    * -   D, R, L, S, I, N    .
    aVarName -    .     ,      .
                -     .
    aValue - ,   ,   .
    ** -  : Date, Record, Logical, String, Integer, Numeric.
  :
                .
  :
     var vVarName: String;
     var vVarValue: Numeric;

     ClearVariable();
     for i := 1 to GetVariavleI('..') do
       vVarName  := Format('..[%d]', i);
       vVarValue := GetVariableN(vVarName);
       vVarName  := Format('..[%d]', i);
       vVarName  := Format('[%d]', GetVariableI(vVarName));
       PutVariableN(vVarName, vVarValue);
     end;

-   PutVariable*, GetVariable*       - .
  :
    PutVariableI('[3].', 123);

-    Cell.    ""   CellContents,       5-      -  ... 
  :
    Cell( : ;  : ; CellContents;  : * [: Logical]) :Res;
  :
     -         CellContents. 
                True,      CellContents.
              5-   ,    , ..   - ''   ,     .
  : 
    Section1.Cell(1, 1, CellContents, '', true); --  ,    Section1,    1, 1.

-  SQL-     Tables.MTL, ..     ,       .
       . ,     ,     Tables.MTL   SQL-,
     ,    Tables.MTL  SQL-, .  .        , 
  ..        .   ,  - .

-    MTI TBMTIViewer.exe    SQL-.

-      . 
  :
    ChoosePrinter(var aPrinter: String; aTitle: String): Integer; : .
  :
    aPrinter -     .
    aTitle -    .
  :
         2- ,        ,   .
      cmOK    1- ,       cmCancel,      .
  :
    var vPrinter: String;
       
      if ChoosePrinter(vPrinter, ' ...') = cmOk then
        Print('', '', vPrinter);
      end;

-   FindObject.          ,       , 
          .         ,    .
  : FindObject('..Button1', myObject);

-   OpenWorkAreaSQL         .
  :
    OpenWorkAreaSQL(aAlias: String; aSQLQuery: String|LongString [; aCardFileName: String [; aPacketSize: Integer]]): Integer;
  :
    aPacketSize -   , ..  ,        .
         ,      ,            SQL-.
        ,       .

-    OpenWorkAreaSQL.
      OpenWorkAreaSQL   aPacketSize ( )    ,       .
   ,    SQL-    .,       . 
              . -       aPacketSize.
     aPacketSize - 100  200.
          aCardFileName - ..  ,       SQL-.
   aAlias .
            .        Records  GetField*.
    Records    , . ,          . 
       .       .
  ,     -  ,     ,   ,        . 
   -       ,     SQL-  .
           GetField*          , 
  ..         Records. 
  : 
    GetFieldI(vWA, Records(vWA), 'UKEY'); --     .  .
   ,            ,      ,     ,    ,
  ..        .
   ,            ,   ,        .
  :
    vLastCount = Records(vWA);
    vUkey = GetFieldI(vWA, vLastCount, 'UKEY');
    if Records(vWA) = vLastCount : --       .
    else 
      --   
  :
  --   _  384 .
  vWA = OpenWorkAreaSQL('', 'SELECT * FROM ' + GetRealCardFileName('_') + ' ORDER BY [UKEY]', '_', 200);
  try
    for i = 1..Record(vWA) do
      vUKeys[i] = GetFieldI(vWA, i, 'UKEY'); --  i  200   200,     200     .
      ...                                    --     Records        .   
    end;
  finally
    CloseWorkArea(vWA);
  end;

        ,  ,    SQL-            (    ) 
            . ..    ,     .
         ,   ,   SQL-        .     "SELECT TOP".
          ...

-   AV CardCurrentUKey,        "  ".
-      ()     .
-            .
-       DBTPath,      ,       .
-      ,           .
-    ,               .
-    () .       -    .
-    .     .      .
-     "   ".        .
-      Hint -     - CellButton.           .
-           .    ,         . 
-    .,         ,     .
-    .    RefreshTable   .
-     ,     ,     , ,       .
-   "Out Of Memory"        .
-       .    ,            .
-      .     CellEventOnLookup, CellEventOnlick.
-      VariableValue,          0.
-          "  ",    .
-    .        ,       "UKey={...} and not ".
-         . 
       ,          .
-     "   ...",      .
-       , Height, Width, Left  Top  Runtime,        Integer.        .

10.10.2005

-   " "   , : 
  - :    ,    ,         .
  - :    .

-         .
-        ,     ,     .

-      (, ,   .)    - .
    "",   "  "  "". 
    "  " -    - /visible,   ""-    - /enabled. 

-   " "   "",            ...
              ...

-   " "    " ".

-     ,  .    .
  :
     GetCardFileByRefField(aCrdName: String; aRefFieldName: String): String;   : .
  :
    aCrdName -    
    aRefFieldName -       (aCrdName).    ,    .
       ,  .   (aRefFieldName)   (aCrdName).

- .,   "  SQL-"     "  "
          SQL-.
  :
    SQLSCRIPT <NameScript>[="<ScriptDescription>"];<DBType>;[-- <Comment>]
      <Text of SQL-script> 
    ENDSQLSCRIPT;
  :
    <NameScript> -  SQL-.
    <ScriptDescription> -  SQL-.     .
    <DBType> -  ,     SQL-    .    :
       MSSQL - MS SQL Server, ORACLE -  Oracle, CACHE' -  Cache' Intersystems.  SQL-  ,      . 
       ..        (Tables.MTL)     SQL-    . 
        ,     SQL-, .    ,  .   .
    <Comment> -    SQL-  2- .
    <Text of SQL-script> -    SQL-,       .
                                      SQL-       ($$).
      :
       $$<CardFileName>$$
      :
       <CardFileName> -      , .        SQL-   .
   SQL-     MS SQL  ,     STREET:
    SQLSCRIPT CREATESTREET="Example for create table";MSSQL; --Create Table object 'STREET'
     if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].$$STREET$$') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
       drop table [dbo].$$STREET$$

     CREATE TABLE [dbo].$$STREET$$ (
	[UKEY] [int] NOT NULL ,
	[CreateTime] [datetime] NOT NULL ,
	[UpdateTime] [datetime] NOT NULL ,
	[NAME] [varchar] (256) NOT NULL ,
	[SOCR] [varchar] (256) NOT NULL ,
	[CODE] [varchar] (256) NOT NULL ,
	[INDEX] [varchar] (256) NOT NULL ,
	[GNINMB] [varchar] (256) NOT NULL ,
	[UNO] [varchar] (256) NOT NULL ,
	[OCATD] [varchar] (256) NOT NULL 
     ) ON [PRIMARY]

   ENDSQLSCRIPT;
   ....
   SQL-    ,       Oracle.     :
   SQLSCRIPT CREATESTREET="Example for create table for Oracle";ORACLE; --Create Table object 'STREET'
   ....

-    MTI TBMTIViewer.exe    SQL-.

-      ,          .
-   AV, .      GETCARDFILEFIELDTYPE, GETCARDFILEFIELDS.
-    .      ,          ,      ,  - " ".
-    .      .    ,     ,     .       .
-   AV, .                  -.
-   AV    -,    -.
-       .
-       ,          .
-      MTL,       FORWARD    ,        .

21.09.2005

-   AlternateTree  2  .
  :
    AlternateTree(aCaption: String; aStrings[]: String; aWidth: Integer; aFontSize: Integer; aPos: Integer; aGroupDelim: String; aHeader1: String; aHeader2: String [; aHeaderWidth1: Integer; aGroupSelect: Logical]): Integer;
  :
    aFontSize -  ,     .
    aHeaderWidth1 -     .        ,       ;
    aGroupSelect -   True,     .        2-   "Enter". 
                      False   ,    .
-  .       .     .
-     "   ". 
         .   ,      ,
        ,        .
-   "   ",     .
    - RestoreOnDesktop,  - 
  : 
    Template.RestoreOnDesktop = false;  --         .
-     ()   " ",        .     .
    ,       :   ,       .
       "",              .
  -   :   ,         .   
  -   :      3   ,      .
  -   :      3   ,    2 .
-        "  " -       .
-   ChooseFile             "DOS ".
  :
    ChooseFile(aFileName: String; aCaption: String [;aFilesType: String [; aDosText: Logical]]): Integer;
  :
    aDosText -   .       ,        "DOS ".
                 ,    True  ,    False.
         cmOK,    aDosText    True,   "DOS "   False,     .
  :
    func SelectAnyFile: String;
    var vFileName: String;
    var vResult: Integer;
    var vIsDosText: Logical;
       
      vResult = ChooseFile(vFileName, ' ...', '', vIsDosText);
      if vResult = cmOk:
        -- vIsDosTex = True,         "DOS "
        Return(vFileName);
      else
        Return('');
      end;
    end;

-     "".
-     "".

-   AV  -,   ,    .
-        AnaElection; AnaElection('*'); AnaElection('');.
-   "     "          "".
-     : MaxInArray, MinInArray, SearchInArray, GetGroupAccounts, Alternate, AlternateTree; 
         .
-    AlternateTree,      .
-       ,       ,    .
-   AV   .    ,     ,    .


05.09.2005

-  .   .         .   2 .    :
  "HKEY_CURRENT_USER\Software\DIC\TBW\6.9\Prof( Base  ProfNet)\GlobTbwSet"  "CheckKeyTry".
-          .
-        ,     
-     ,      ( ),     "",         .
-                ,         .
-   /      
         ""   
  -  AfterInsert | 
  -  OnDelete    | 
  -  AfterDelete | 

  -/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/    "Cell"  "Section"  .
  - CellEventOnEnter  | 
  - CellEventOnVerify | 
  - CellEventOnExit   |  
  - CellEventOnType   |  
  - CellEventOnLookup |  
  - CellEventOnClick  |     

- ErrorMessage -    
  : 
   
  :
   ErrorMessage: String;
  :
               Except ... End.
  :
   try 
     --    
   except 
     Message(Format(': %s^M: %d', ErrorMessage, ErrorCode), mtError);
   end;
-         512.
-      ,      ,      .
-       "  ", "  "    .
-    MTI TBMTIViewer.exe ,    MTI      6.9.
-  .     .
-  "  ".   "   ".
-   "" ,           .
-  .     ,         .
-  .   " "       ..
-   AccountElection    .
  :
    AccountElection[(aMask: String [; aSelectGroup: Logical; aPosition: String)]: String;
  :
    aSelectGroup -  ,     . 
                      ,       "",         . 
                      "",      ,    .
    aPosition -  ,        .
                    ,       ""    .
     ,           .

-   AnaElection   .
  :
    AnaElection[(aMask: String [; aGlossaryOnly: Logical [; aSelectGroup: Logical [; aPosition: String]]])]: String;
  :
    aPosition -  ,        .
                   ,       ""    .

- (   Delphi   PromptX  )
     .
  :
    Format(aFormatStr: String; aArg1 [,..., aRrgN]: Integer|Numeric|String): String; : .
  :
   aFormatStr -  
   aArg1...aArgN -   ,    .
     2       .       .
             . 
       :
  "%" [index ":"] ["-"] [width] ["." prec] type
      "%".  "%"   :
  -    , [index ":"]
  -    , ["-"]
  -   , [width]
  -   , ["." prec]
  -   , type.
          , type:
  d -  .      .      .      ,  ,           ; 
          ,   -  .

  e - .       .      "-d.ddd... E+ddd".      ,   .      .
            (    )       -    15 ,     . "E"                 . 

  f - .       .      "-ddd.ddd ...".      ,   . 
                 -   2  ,      .

  g - .       .       ,     .             -    15 ,      .
           ,       .      ,               ,        0.00001.      .

  n - .       .      "-d, ddd, ddd.ddd ...". 
       "n"   "f",   ,      .

  m - .       .    ,    . 
                Windows.      ,   ,   .

  s - .    .     .  ,     ,     .   - ,      ,  .

  x - .      .      .      ,  ,           ;     ,   -  .

                -      .
       ,   ,          .
   (index),  (width),    (prec)   ,      ( "%10d"),      ( "% *.*f"). 
   ,      (     )  ,   . 
  , 
    Format('% *.*f', 8, 2, 123.456) 
       
    Format('%8.2f', 123.456).
         .        ,    ,    .      ,    , 
        - ("-" ,   ),  -,    .
           .       - 0.   ,        . 
  :
    Format('%d %d %0:d %1:d', 10, 20)   '10 20 10 20'.

-    OpenEditor   .
  :
    OpenEditor(FileName: String [;CodePage: Logical]);
  :
    CodePage -  :  ""   Windows, ""  DOS.
                 ,      "". 
-     .
  :
    GetActiveBlankName: String; : .
      .  ,     .   ,     .

-    .,        ,         , ,   .
- ,  -          0.     Exception.
-          .
-        Cell.
-                ,        " "        .
-         ,        "  ".
-   " ...  "   RefreshCard  ., .  ,   .  ,  .     ,       .
-     ,     Ctrl+Enter,      " ".
-       RTF,           .
-         ,   .
-     ,    Ctrl+Enter.
-       ,       Ins, Del      .
-           .
-    . 'Cannot specify (create) more than'           MS SQL.
-    .                  .
-     " "   " "   " ",     " / ".
-     ,             .
-           . 
-   "     ",        F1.
-      " ",      ""   .
-   AV     (      )
-  ,              " ...  ...".
-   AV     ,     .
-        "", " ",    -   .     .
-                 .
-        ,  TaskBar   .
-   AV              .
-            .

05.07.2005

-        ,           .
-       .,         ,         .
-       .,         ,        ,   " ",    ,     ,         AV.
-       .
-   AV            .
-   AV   ,      ,   .     .
-     ,        .

-  "      ".
  :
   
  :
   AlternateTree(aCaption: String; aStringArray[]: String; aWidth, aIndex, aFontSize: Integer; aGroupDiv, aTitle1, aTitle2: String): Integer;
  :
   aCaption -   ;
   aStringArray -  ;
   aWith -    .    ,      .
   aIndex -     ()     .
   aGroupDiv -     .
   aTitle1 -       .
   aTitle2 -       .
  :
                    ,      ,       .
    0              (      ).
  :

  var vKBK[]: String;
  func SelectKBK: String;
  var vIndex: Integer;
    ClearVariable(vKBK);
    vKBK[1]  = '188 --   ';
    vKBK[2]  = '188.0000';
    vKBK[3]  = '188.0000.0000000';
    vKBK[4]  = '188.0000.0000000.000';
    vKBK[5]  = '188.0302' --  ;
    vKBK[6]  = '188.0302.0000000';
    vKBK[7]  = '188.0302.0000000.000';
    vKBK[8]  = '188.0302.0010000 --      ';
    vKBK[9]  = '188.0302.0010000.239 --   .  ,  . ';
    vKBK[10] = '188.0302.0010000.240 -- ';

    vIndex = AlternateTree(' ', vKBK, -1, 0, 0, '.', '', '');
    if vIndex = 0 :
      Return('');
    else
      Return(vKBK[vIndex]);
 end; --SelectKBK

10.06.2005

-     ,         Turn      ,   .
-      CopyArray  4- .
-   AV, .      .,   - ,        .
-     SortArray, .       AV.
-  .    ,       ,   ""   -1.        "".
-     ,         .
-     ,        .
-     ,       "  " (Ctrl+A+A)          "  ".
-        - ,    .
-  :  ""      .
-  :    ""   ,   .
-       ,     .
-       MS Excel         "  ",   "  " .
-     -  DocID.
-   "  ...", .      ,     , .    .
-    .           .
-      RecSignsCount,       ,         <>.<>.
-       \.
-  ,      Ctrl+P+...  
-    .       ..

-   " ",   " "  "    "    "  ",    ,          .
-   "  "    "..."    .            .
- .       .
-  .          ,       .
-              .
-    .       " "    , ..    ,      ,   .
-  ""  .     " "      " "     - ,      . ,     .      -,      .
-  .                "".          .
-   MTL,      ,       "".
-  .    "-"   ,    .
-     /C  /D,       DBO  .
-   "  "   "  ", ..      .
-  .      "Invalid column name...".

-    SortSection   .
  :
    (: ; :  |  [; :  [; : ]]);
  :
     -             .
           True,     .   False,      .

-         .      Cells  Section        CellFieldType ().
    /  -" "  .   : .
        
   cftStaticText     ()  = 1
   cftCommonField    ()         = 2
   cftStringField    ()     = 3
   cftNumberField    ()      = 4
   cftDateField      ()          = 5
   cftFieldEnum      ()  = 6
   cftReferenceField ()     = 7
   cftCalcField      ()    = 8

-   SignCardFile    .
  :
    SignCardFile(aSign: String [; aRefreshAna: Logical]): String;
  :
   aRefreshAna -  TRUE   ,     RefreshAna    .
                  FALSE,  RefreshAna       ,    , 
                  -   ,    ,  .         RefreshAna.
  :
    if not  then
      RefreshAna;
    for Sign vAna = '*', Sort do
      vCardFile = SignCardFile(vAna, False); --   False, ..   RefreshAna
      if vCardFile <> '':
        ..........
      end;
      ......... 
    end;

-     .
  :
    Ascii(aSymbol: String): Integer;  - "".
  :
   var vRes: Integer; 
      
   vRes = Ascii("X"); -- vRes = 88

-       . :
  GetCardFileFieldType(aCardFileName, aFieldName: String): Integer; : .
  :
    aCardFileName -    .
    aFieldName -     .
     , .    :
    mtlREAL -  
    mtlINTEGER-  
    mtlBOOLEAN - 
    mtlSTRING - 
    mtlDATE -  
    mtlSUBTAB -  
    mtlREF -  
    mtlTimed -  
  1:
    var vType: Integer;

      vType = GetCardFileFieldType('', ''); -- vType = mtlString

  2:
    var vType: Integer;

      vType = GetCardFileFieldType('', '');
      if vType = mtlTimed: --  
        vType = GetCardFileFieldType('@', ''); -- vType = mtlReal ([]: Real;)
      end;

- ,             .
  :
    GetGroupAccounts(aCondition: String; aAccGroups[]: String; aNumGroup1 [, aNumGroup2 .. , aNumGroupN]: Integer): Integer;
  : .
  :
    aCondition -      .
    aAccGroups -    .    .   .
    aNumGroup1 .. aNumGroup1: Integer -    , .   .
    -   .
  :
      : 
      188.0302.0010000.239.1.101.02.310
      188.0302.0010000.239.1.101.02.410
      188.0302.0010000.239.1.101.07.410
      188.0312.0810000.220.1.503.01.820
      188.0312.0810000.220.1.503.01.810

    var vAccGrp[]: String;
    var vCount: Integer;  

    vCount = GetGroupAccounts("188.*", vAcc, 5, 6, 7);

    vCount = Alternate(' :', vAccGrp, 25);
    --   ""   :
    --   1.101.02
    --   1.101.07
    --   1.503.01

-         .
  :
    FindObject(aObjectName: String; aVarObject: Object): Logical;
  :
    aObjectName -      ;
    aVarObject -        ,  .      .
    True,         .    ,    False.
  :
     "Example for FindObject";
    ...
    Button4: Object;
    Button5: Object;
    ...
    Proc Button5_OnClick(Sender: String);
    var vObject: Object;

      if not FindObject('Button4', vObject):
        Exit;
      end;
      if AsLogical(vObject.Enabled):
        vObject.Caption = 'Disabled';
        vObject.Enabled = False;
      else
        vObject.Caption = 'Enabled';
        vObject.Enabled = True;
      end;
     end;

-   Alternate        .
  :
    Alternate(Title: String; ArrayOfString[]: String [; Width: Integer [; Position: Integer [; FontSize: Integer]]]): Integer;
  :
    FontSize -  ,     .

-         "CellLinesCount|""              " ".
  :
    vLinesCount = AsInteger(Section1.Cell(1, 1, CellLinesCount, 'Oops Oops Oops Oops Oops Oops Oops Oops'));  
    --  vLinesCount   -   .    ,  ,    .
      ,    - ,  .     .
  :
    vLinesCount = AsInteger(Section1.Cell(1, 1, CellLinesCount, ''));
     " "      ,     1.

-        ,  .   .
  :
    Com_Var_File(aComVarName: String): String; : __.
  :
    aComVarName -     .
       ,  .   .

12.05.2005

-      WriteVarInDBT, .                 .
-      RecSignsCount,       ,         <>.<>.
  :
     .1 (,,,,'') -- 
     .3 (,,,,'') -- 
  :
     - 
    1  3 -    

-           ,      " ".
-          ,               ESC,       BRO-.
-        .
-   "     ", .      .     .
-             Enter              .
-      bro-    -  .          .
-           ,              ,    .
-  ,          ""    .
-   AV,    ,     .
-     DBT       .
-   AV, .       ..
-   "Class T_Panel not found" 
-           90 .
-          Shift+BackSpace,    Enter    .
-  ,       "B" ,        "B" .
   ,            "B".
-       -              .
-  , .              .
-         "",         ,                .
-      ,     ,       .

-  ""        ().   , :
  - .   .         ,     .     .   .  ,                 .
  -   ,         -      .
-               .      ,        .       ,       , ..  .
-     RTF  Word .        ,     .
-   "  "    ""   "".
-     ""    "Enter"
-   ,    ". " ,   ""      .
-             .
-    BRO    .
-      CardFileRecSign  .   MS SQL.
-                  .
-   .         .
-    " /  "  " ()"   "  " ,        , 
     "   ".            ,
       .         .        , 
              .    ,    
   .       .
      :
      -      .
      -      .
      "<>" -           .

-   OpenDBF         29   DBF-. 
  :
    Dbf(Dbf : ;  : ;  : ; DOS :  [; :  [; : ]])) : ;
  :
     - ,     29   DBF-,  ,     (.  ).
                          : DbfCpDos866 = 101 (0x0065), DbfCpWin1251 = 201 (0x00C9).
                             DOS.    ,  0.

-     " ".
               
         .
     "Ctrl+Alt+Down"


-     :
     { CellLookup /  }
   Cells  Section        CellLookup  /  "   "  .
  :
  .... 
  testSection :Section;
  ....
  proc (S :String);
  var vLog :Logical;
    --   - "   "
    vLog = AsLogical(testSection.Cell(1, 1, CellLookup, ''));
    --     
    testSection.Cell(1, 1, CellLookup, not vLog);
  end;

-   CardFileRecSign    , , .      ,  ,   .    .
  :  
   CARDFILERECSIGN(: String; : String; : String; : Record [; : String]): String;
  :
    -  , .        ,  ,  ,  .   "", .    .
   ,         .
     ,      .
  :
    Trace(CARDFILERECSIGN('', '', '', {50}, '.*')); -- .00010.00050.*  ,    UKey = {50} . .
    Trace(CARDFILERECSIGN('', '', '', {50}, '.*')); -- .00010.00050    ,    UKey = {50}  . .

06.04.2005

-        .,      ,  .      .
-   AV      "  ",            .
-        ,               ""     ,      .
-         ""                    , 
        "- ...  ".
-   AV, .         - ,   AV,       . .
-       .,      ,     .
-    .    ,   ,  .   " "            .
-    , .    ,        .
-               ,     .
-    .    ,        ,    "        ".
-    .    ,         ,    .

-             " "    .
-    GetCardFieldS  ..
-   AccountElection,PickCorrAccount      "", "" .    ""  .    .
     ,        ,    .    ,     AV.
-     .             Tab,     .  ,     .
-   "  "   "  ".   .      "  "  "  ".
     ,             ,       .
-         .
-    GetCardFieldD  ..
-     GetFieldsVars.

-     : RefreshRep    :  :;
  :  ,     "     "   " ".   ""   ,   ""  . 
  :
   Proc P1( : );
   --     ""
     If  :
       ("       ");
     else
       ("       ");
     end;
   end;

-   : ToggleRefreshRep  :
  ( : );
   :
        "     ". 
  :     "     "   " ".   ""   ,   . 
  :
    P1( : );
     If not  :
       ();
     end;
     ("       ");
   end;

28.03.2005

-      AnaElection       "|".
-           Win XP.
-           .
-    .    SchemaName  GetScheme,            ,          ..
-       (MTL),       .
-    .         ,      ,       .
-           Win 9x.
-       Version  .: ""   "".
-           " ".
-  ,         ,      - ,     .      .    .
-        " ".
-     -    OpenBlank  2-    ,         "      ...".
-   AV       ,       .
-   "Incorrect syntax ..."      .
-         .
-    .       - .
-     .        - .
-  , .  ,                    .
-      6.7    TujReportEnd.
-      ,        ,     .
-    .  .,                    .     ,   ,    .
-      Random.
-              .
-              .
-            ,     , , , ,   .
-         .
-         PageDown      ,        .
-  ,            255 ,       .
-     " ",      .
-     - ,          : #<>.
  ..  ,        .
-     ,       ,       .
-   AV           .   255 .
-       " ",           .
-     ,              .
-     ,           .
-       PutAsArray, GetAsArray.
-            ..
-   AV    Search    ..
-      LockRecord.
-           .
-      AnaElection       "|".
-       ,   .   .
-        .
-       ,      ,    .
-       ,     ,  .   ,   .
-         .    ,     ,      .  .
-     ,     .
-  ,       "  ",      .
-      ,              .
-   AV       ESC.
-                    .
-    .   "   . ?".
-                  .
-    .      .,          ,   .,   .          ...
-       ,     .
-            ,   -         .
-       ,             .
-      ,          ,        .
-        ,     .       .
-       ,         ,        .
-   AV,             " ".
-     ,  DiskFree  DiskSize     ,    2Gb (FAT32),  D3   64-bit .
-       ,   ,  ,        .     .
-        -    ,      .
-     "" - ,            .
-    .      .,          ,   .,   .          ...
-       LicenseCheck .    ,        .  ,    , ..       ,          .
-       " ",    ,      .
-      LOckRecord.
-    .   "",     2   ,    .
-        .,    ,        .
-      .,         .
-      ,      ,          .
-    .    ,      "", " ".
-       ,    ,  -   .

-      .    : " ", "  +  ".
-      .
-   -       , .  .  .
-       Shift+F3   :  ,  ,      .
-       Shift+BackSpace             .
-  .     .         .
-       ..
-                  :
  ALT + < >  -    ,     .
  ALT + < > -    ,    .
-   " " -        "".       "".      -.
-    " ", "".
-    :  ,,  , ,  .
-             .
-   " "   .
-    DBF-  29-   ,        DOS  Windows  .
-  .      (Tables.MTL)  .
-    DBTPath=<   BLANKS.DBT>. 
   ,       .   ,        .
    BLANKS.DBT   : tbw.exe \dbtpath=D:\Temp
-         "REVERSE".
-     " " c : , ,  
-     : " - 70", " ".
-  . (  )     ,   . ,       .
-        ,   .

-  .     GetCardField*    (,     )     MS SQL.
-   SignToRecord    . 
  :
   SignToRecord(aAnaIdent: String [; aRefreshAna: Logical): Record;
  :
   aRefreshAna -  TRUE   ,     RefreshAna    .
                  FALSE,  RefreshAna       ,    , 
                  -   ,    ,  .         RefreshAna.
  :
  if not  then
    RefreshAna;
  for Sign vAna = '.*', Sort do
    vRecord = SignToRecord(vAna, False); --   False, ..   RefreshAna
    ..........
  end;
-    : .  SIGNSADD.      .
     ,             .
       ,    " "      .
         ,    . .      .
  :
     $\.SIG  --         .SIG
-   GetAsArraySQL         .
-   GETFIELDSVARS            .
-   GetAsArraySQL      . :
  GetAsArraySQL(aWASQL: Integer; aBlank: String; aFields: Strring | LongString): Integer;
-  GetFieldR        OpenWorkAreaSQL   .
-    OpenBlank,          ,          .
-     LOckRecord.
        LOckRecord,       False. 
  :
    if LockRecord(, 2, 10): -- True
      if LockRecord(, 2, 10): -- False

      end;
    end;
-   LicenseCheck              . :
  LicenseCheck(aProdCode: Integer [; aShowMessage: Logical]): Integer; :
   aShowMessage -  True,         (aProdCode)   ,   . (  )     .
                    ,  False,    .

- !!!   !!!   
    DownloadInternetFile           . :
  DownloadInternetFile(aUrl, aFileName: String[;aProxyUserName, aProxyPassword: String [; aProxyName, aProxyBypas: String; aRaise: Logical]]): Logical; 
  :
    aUrl -     
    aFileName -  ,      .
    aProxyUserName -         - .
    aPassword -        - .
    aProxyName -     -.   ,  .
    aProxyBypas -      ";",  .    - .   ,  .
    aRaise -  TRUE,    ,   .  FALSE,    ,    FALSE    .   ,  FALSE.
     True -    .

-          . :
  DayOfWeek(aDate: Date): Integer; : . : aDate - .
      : 1 - ,...,7-.
  :
  Trace(Str(DayOfWeek(ToDay))); --   .

-           . :
  GetFieldsVars(aWA, aRecNo: Integer; aBlank: String; aFields: String | LongString); : .
  :
    aWA -    
    aRecNo -     
    aBlank -      .  ,   .
    aFields -         . :
      '<VarName1>=<FieldName1>[|<VarNameN>=<FieldNameN>]'. :
         <VarName> -          <FieldName>.
  :
    var Description: String;
    var Sign: Integer;

     27_(: );
    var vWA: Integer;
      vWA = OpenWorkArea('', '');
      try
        if Records(vWA) > 0 :
          GetFieldsVars(vWA, 1, '', 'Description=|Sign=');
          Trace('="' + Description + '", ="' + Str(Sign) + '"');
        end;
      finally
        CloseWorkArea(vWA);
      end;
    end;

-           . :
  PutFieldsVars(aWA, aRecNo: Integer; aBlank: String; aFields: String | LongString): Integer; : .
  :
    aWA -    
    aRecNo -     
    aBlank -      .  ,   .
    aFields -         . :
      '<VarName1>=<FieldName1>[|<VarNameN>=<FieldNameN>]'. :
         <VarName> -          <FieldName>.
     . 
  :
    var Description: String;
    var Sign: Integer;

     27_(: );
    var vWA, vRec: Integer;
      vWA = OpenWorkArea('', '');
      try
        if Records(vWA) > 0 :
          BeginChanging(vWA);
          try
            vRec = PutFieldsVars(vWA, 1, '', 'Description=|Sign=');
          except
            CancelChanging(vWA);
	    Raise;
          end;
          EndChanging(vWA);
        end;
      finally
        CloseWorkArea(vWA);
      end;
    end;

-           "Required ()".
  :
  proc SetRequired;
   Editor1.Required = not AsLogical(Editor1.Required);
  end;

-          "CellRequired ()".
  :
  proc SetRequired;
  var vRequired: Logical;
    vRequired = AsLogical(Section1.Cell(1, 1, CellRequired, '');
    Section1.Cell(1, 1, CellRequired, not vRequired);
  end;
-          "RowNewPage ()".
  :
  proc SetRequired;
  var vNewPage: Logical;
    vNewPage = AsLogical(Section1.Row(1, RowNewPage, '');
    Section1.Row(1, RowNewPage, not NewPage);
  end;
-         "  ".   .
    ,      ,      , , 
         .
-        "  ".   .
    ,      ,      , , 
          .
-  Timer.  .
     Timer   ,         .
  : 
   - Interval () -        ,    .
   - Active () -        .
  :
   - OnTimer () -         .
  :
   Proc OnTimer(Sender: String); : Sender -     . 
    ,        .
  :
   Proc OnTimer1(Sender: String);
    Trace(' : ' + Str(Time));
   end;

-    (OLE Automation).   .   .
         AutoObject  .

      . :
  CreateAutoObject(aOLEObjectName: String): AutoObject; : . :
    aOLEObjectName     Windows  OLE-.
  :
       OLE-,    Windows,          .    ,    ().
  :
           ClearVariable.
  :
     Proc OpenWordButtonClick(Sender: String);
     var vApp: AutoObjetc;
       vApp = CreateAutoObject('Word.Application'); -- C .
       try
         vApp.Visible = True;
       finally
         ClearVariable(vApp);
       end;
     end;

      . :
  OpenAutoObject(aOLEObjectName: String; aCreate: Logical):AutoObject; : . :
     aOLEObjectName      OLE-;
     aCreate   : TRUE     ,    , FALSE ,    ,    OLE-   ,    .
  :
        OLE-,    Windows, ,     .    ,     ,        ,    ,    CreateAutoObject. 
       ,      ,        ,     TRUE.
  :
           ClearVariable.
  :
     Proc OpenWordButtonClick(Sender: String);
     var vApp: AutoObjetc;
       vApp = OpenAutoObject('Word.Application', True); --  .   ,  .
       try
         vApp.Visible = True;
       finally
         ClearVariable(vApp);
       end;
     end;
   
     OLE-   AutoObject. :
  AsAutoObject(Properies): AutoObject;  . :
     Properies -  , .     .
  :
             ClearVariable.
  :
     Proc OpenWordButtonClick(Sender: String);
     var vApp, vDoc: AutoObjetc;
       vApp = OpenAutoObject('Word.Application', True); --  .   ,  .
       try
         vDoc = AsAutoObject(aApp.Documents); --    OLE- Word.Application.Documents.
         try
           vDoc.Open('D:\Temp\.rtf', ,True); -- Word.Application.Documents.Open 
         finally
           ClearVariable(vDoc);
         end;
         vApp.Visible = True;
       finally
         ClearVariable(vApp);
       end;
     end;
     :
      ,         Open    .

        OLE-       .
   :
     Proc OpenWordButtonClick(Sender: String);
     var vApp: AutoObjetc;
       vApp = OpenAutoObject('Word.Application', True); --  .   ,  .
       try
         if AsLogical(vApp.CheckSpelling('!')):
           Message(' ...');
         end;
       finally
         ClearVariable(vApp);
       end;
     end;

    ,    OLE-   .     ,      ,     .
   :
     Proc OpenWordButtonClick(Sender: String);
     var vApp: AutoObjetc;
       Other.Blank.App = OpenAutoObject('Word.Application', True); --  .   ,  .
       try
         vApp = Other.Blank.App;

         if AsLogical(vApp.CheckSpelling('!')): -- ..   (Other.Blank.App.CheckSpelling) .
           Message(' ...');
         end;

         vApp.Quit; --  MS Word.
       finally
         ClearVariable(vApp);
       end;
     end;

    AsAutoObject         .
  :
    proc SetExcelCellValue;
    var xlsApp, xlsBooks, xlsBook, xlsSheet, xlsRange: AutoObject;

     xlsApp=OpenAutoObject('Excel.Application', True);
     try
       xlsBooks  = AsAutoObject(xlsApp.Workbooks);
       try
         xlsBook	= AsAutoObject(xlsBooks.Add);
         try
           xlsSheet = AsAutoObject(xlsBook.Worksheets[1]);
	   try
	     xlsRange = AsAutoObject(xlsSheet.Cells[1,1]); --      (1, 1)
             try
	       xlsRange.Value = 10; --      
	     finally
	       ClearVariable(xlsRange);
	     end;

             xlsApp.Visible = True;
     
           finally
             ClearVariable(xlsSheet);
	   end;
         finally
           ClearVariable(xlsBook);
         end;
       finally
         ClearVariable(xlsBooks);
       end;
     finally
       ClearVariable(xlsApp);
     end;
   end;

20.01.2005

-  ,      DEL     .
-   "AV"   BeginChanging      OpenWorkAreaSQL.
-   "AV"  .   .
-   "AV"     .
-   "AV"  ,   "TEMPLATE"  .
-    .   " "  ,          .
-      ,      .
-          .
-    .   OpenCardFile,   , .    .
-      ,    .
-                ,     .
-   "AV"   ,     - -     .
-   "AV"     ,      .

- .  .   tbw.ini    BIN, CACHE, INI, STD, WRK       EXE,   CACHE -   Windows.
-    ,            .
-          .
-    "  "    -   -  .
-   .   " "  " "      " ", " ".
-       (uFilesDiff),    .
             (uMergeAll)
     ,  -     (    ).   ,   , . 
       "Enter"       (uTxtComp)    .

-    ENQOKCANCEL, ENQYESNOCANCEL     MESSAGE        . :
  ENQOKCANCEL(Question: String [;aMessageType: Integer]): Integer; 
  ENQYESNOCANCEL(Question: String [;aMessageType: Integer]): Integer; 
  MESSAGE(Message: String [;aMessageType: Integer]); 
  : aMessageType -       :
  - mtWarning -  .  : 
  - mtError -   . : 
  - mtInformation -  . : 
  - mtConfirmation -  . : 
  - mtCustom -    (    ). : 
     ,    ENQOKCANCEL, ENQYESNOCANCEL     mtConfirmation,    MESSAGE  mtInformation.

-   (Enquiry)    .
  :
    (, , :; : ): ;
   Enquiry (Title, Request, ButtonsFace: String; DlgType: Integer): Integer;

  :

         .   ,        (DlgType);
         ;
       ,      ";".
   DlgType -      :
      mtWarning -  
      mtError-   
      mtInformation -  
      mtConfirmation -  
      mtCustom -   (    )

  :

          ,       .      0,     (   ESC). 
       ,        (DlgType).

  :

   proc P1;
    if ("" , "  ?", "; ; ", mtConfirmation) = 1:
      (" ");
    end;
   end; --P1

-      . :
  ExistsCardFile(aCardName: String): Logical; : . : aCardName -    . 
    True,      .

-      SQL . : SQLQueryEnabled: Logical; : SQL.
   TRUE,      .   "SQL ",     SQL    OpenWorkAreaSQL, ExecuteSQL.
       FALSE.

-   CopyArray  2          .
  : CopyArray(aSrcArray, aDstArray: * [;aSrcIndex, aDstIndex: Integer]); :
  - aSrcIndex -    ,       .
  - aDstIndex -    ,       
      ,              .
     ,                   .
  1:      

   var vArray1[]: Integer;
   var vArray2[]: Integer;

   proc CopyArrayExample;
       CopyArray(vArray1, vArray2);
   end;

   2:           

    CopyArray(vArray1, vArray2, 1, 1);

   3:       

    CopyArray(vArray1, vArray2, 5, 10);


22.12.2004

-   "AV"               .
-     " " 
-         MS Excel.
-     ,      ,     
-   "AV"       F4     ,    ,       ,           .
-   "AV", .             - ,    ". "  F4,      .
-     SumOfArray,     = 0,      ,   .
-         ,      .
-      IsAccBalance,    True  False   "0"  "1".
-       ,          .
-        255 ,      .
-                ,    ,      . ,    ,                  ,         .
-           .
-   "AV"           .
-     PlanVar,        "..".
-         6.7.
-          .
-   List Index of bounds (-10), .     ..
-         
-  ,       "".
-       ,          "OnBeforeScroll", "OnAfterScroll".
-      ,      ,            ,     .
-      ,         ,    ,        .
-          ,      .
-        ,      "*ABC!".
-     ""   "*"  < >            .
-         .,     " ' ".
-       ,             .
-        AfterDelete, OnDelete.
-      ExportCard,    - -,     .
-   "AV"        .
-       - ,       .
-            ,    ,             .
-      "Print"   ,      "  ".
-           
-   "AV"    ,     .
-   "AV"     .,      .
-       "".
-        ,         .       .
-   "AV"   PrintCardBlank, .  ,     -.
-      Print,      .
-     ,          , ,    .
-   "AV"    DBT , -    65535.
-          .
-      ClearBlank,    .
-         ,    255 .
-         ,    255 .
-      SearchInArray, InsertInArraySort.
-       "Cannot focus...", .  ,    , .   .

-      ,   Return       .
-                CTRL    .
-         "B"   .   : "HKEY_CURRENT_USER\Software\DIC\TBW\6.9\Prof\GlobTbwSet"  "AccBalFormula".
-              ,         .
-           "Sort"     . (       ).   ,        .
-         65 535  1 048 575.
-             "".   .   ,                  .
-    ,    root-,       (Wrk).
-             ,    - .
-  .        ,   .  ,   MTL   MTI,     ,       .  ,    MTL    MTI,            . 
-          " ".
-          "",      "".
-        65535.
-   InsertInArray, InsertInArraySort.
-   "  ..."    MS Windows code name "Longhorn".
-    .            " ...".
          ,    .
    ""       " ...". 
    ,     ,    .

-           - - " " c    -  .
-       , -    root    . 
-  ""            .    ""          ,     .
-               .          

-   DownloadInternetFile  2  . :
  DownloadInternetFile(aUrl, aFileName: String[;aProxyUserName, aProxyPassword: String]): Logical; :
  aProxyUserName -         - .
  aPassword -        - .

-         . :
  ChooseCardFile(aVarCardName: String): Integer; : . : aVarCardName -  ,  .      .
    cmOk,     cmCancel   . :
  var vCardFile: String;
     if ChooseCardFile(vCardFile) = cmOk:
        Trace(vCardFile);
    end;

-         . :
  :;
  BaseCurrency:String;
  :        , , .
  :
    func  (aCurrencyCode :String; aDate :Date) :Numeric;  --         
      if (Up(aCurrencyCode) = Up()):
        Result = 1; -- 1  1
      elseif
        Result = Com_Var('.' + aCurrencyCode, aDate);
      end;
    end;

-  ,        . :
  GetCardFileFields(aCardileName: String; aArray[]: String; aFieldsType: Integer): Integer; :
   aCardileName -    .
   aArray[] -  .
   aFieldsType -  .      :
      mtlREAL -  
      mtlINTEGER-  
      mtlBOOLEAN - 
      mtlSTRING - 
      mtlDATE -  
      mtlSUBTAB -  
      mtlREF -  
      mtlTimed -  
      mtlAll -   .
          , ..  .  1:
      var vFieldList[]: String;
      proc SelectField;
       var vCount: Integer;
        vCount = GetCardFileFields('', vFieldList, mtlAll); --    
        if vCount > 0 :
           vCount = ('   ', vFieldList);
        end;
      end;

       2:
      vCount = GetCardFileFields('', vFieldList, mtlString); --    

       3:
      vCount = GetCardFileFields('', vFieldList, mtlReal + mtlInteger); --     

       4:
      vCount = GetCardFileFields('', vFieldList, mtlAll - mtlSubTab - mtlTimed); --        .

-       ( )         (GROUP).
         . :  <> <>
   1:
   
       01 --    
              01	         120  000	  (   )
              01.1        120  000	       - .
              01.2        120  000	  , ,   .  - .
              01.   000  000	     ( )

   2:
    
         69 --     
             69	   242	623       
              69. --     .
             69.	     <69>         .
             69.. <69.>       . -  
             69.. <69.>       . -  

-         . : ABS(aValue: Integer | Numeric): Integer | Numeric; : .
  : 
   var vIntVal: Integer;
   var vFloatVal: Numeric;
      vIntVal = ABS(-1); -- vIntVal = 1
      vFloatVal = ABS(-1.1); -- vFloatVal = 1.1

-  , .        . :
   AccountUsed(aAccount: String [; BeginDate, EndDate: Date;]): Logical; . :
   - aAccount -   .
   - BeginDate, EndDate - ,  .        .   ,    .
   True,     ,  False.
  :
    if AccountUsed('.'):
      Trace('   ');
    end;

    if AccountUsed('.', 1.1.2004, 1.1.2005):
      Trace('       1.1.2004, 31.12.2004');
    end;

-      . :
  CopyFile(aSource, aDestination: String); : . :
  aSource -    , ..  .
  aDestination -    , ..  .
  :
   CopyFile('D:\tb69p\67to69.rtf', 'D:\Temp'); --   "67to69.rtf"   "\Temp"
   CopyFile('D:\tb69d\*.*', 'D:\Temp\1'); --     "\tb69d"   "\1"  
   CopyFile('D:\tb69d', 'D:\Temp'); --   "\tb69d"   "\Temp"

-    Print       . :
  Print(Blank: String [; ConfigFile: String [; Printer: String [; Orientation: Logical [; PageFrom: Integer [; PageTo: Integer [; Preview: Logical]]]]]]); :
  Preview -  TRUE,    .   ,  FALSE.

-            . :
   ExistsTransacton(Condition: String; BeginDate, EndDate: Date): Logical; : . :
    Condition -     .
    BeginDate, EndDate -     .
      True,         .

-     :
   - "-    "
   - "- 2005"
   - " "
   - "  "

29.10.2004

-   Access Violation    SortSection,       . .
-       SortSection, .        .
-      ,       ,   ,  .   .
-     ,                .
-  ,         .
-        ,    .
-    .        ,   ,       .
-            ,  "   "      .
-  access violation  . ,   CTRL-S     .
-  ,         .
-       MS Word, MS Excel, RTF, HTML,    .
-     -     ,   ,      "  ".
-  ,    .               .
-      ,      Index        .
-      ,      Index        .
-        ,     "+"  "-".
-      6.7,      ExportRTF.
-   . .  access viol.        . .
-  ,        .    WinXP sp2, Win2003.
-                .
-      / .
-             ..
-        Message  Hint.
-      "  "   .
-       " ", .         .
-        .          .
-    ,        .
-         ..
-      .
-         ""      256   ,          .
-   "   "    GetAsArraySQL.
-      ,     NTFS       .
-   RunTime 217        "" .

-  Name_A.           ,      ,      ,  -  .      ,    .
-      , ,    .          ,  Ctrl       .       (      -   ),   ,   /.      "".
-               .
-                  ('_','.').
-     c       -  ( -, -).
-         .
-         "  .       ,      .
-   InsertFrame  ,    ,   .
-   " "            .
-         "".           .
-           ,     .
-                 .
-        . :
  RenameFile(OldFileName, NewFileName: String); ().  . : OldFileName -     , NewFileName -     .
  ExistsFolder(FolderName: String): Logical; ().   True,   (FolderName) .
  CreateFolder(FolderName: String); ().  . : FolderName -    .
  DeleteFolder(FolderName: String); ().  . : FolderName -    .
  RenemeFolder(OldFolderName, NewFolderName: String); ().  .  : OldFolderName -     , NewFolderName -     .
-   Close     -  . : Close[(aBlankName: String;)];  aBlankName -     .
  .            .    .       .
-           . 
  : CopyArray(aSrcArray, aDstArray: *); : . : aSrcArray -     . aDstArray -     .

01.10.2004

-             .
-  ,     TreeView    ..,       
-  ,          .
-    .,              ,    .
-      EditorCancel    ,          "",     ,     AccessViolation   -   .
-       .         -  (   )

-   . .   .        ,          .
-       GetAsArray.
-       MS Windows.
-   AnaElection          . :
  AnaElection[(aCondition: String [; aGlossaryOnly: Logical [; aGroupSelect: Logical])]: String; :
  aGroupSelect -  True,            .  False,      .   ,  False.
     ,          .
-            SQL   . :
  GetAsArraySQL(WA: Integer; Blank, Fields: String): Integer; : SQL. :
    WA -   ,   OpenWordAreaSQL.
    Blank -    ,       .  ,   .
    Fields -         . :
      '<VarArrName1>=<FieldName1>[|<VarArrNameN>=<FieldNameN>]'. :
        <VarArrName> -           <FieldName>.
      ,     .
       ,        .
        .           .
  .          .
  .  .         0.
           :
  var []: Numeric;
  var []: Numeric;
  ....................................................
  proc LoadToArray;
  var vWA, vCount: Integer;
  var vSQL: String;

    vSQL = 'SELECT [] AS BBB, [] AS AAA FROM ' + GetRealCardFileName('') + ' ORDER BY [UKEY] ASC';
    vWA = OpenWorkAreaSQL('', vSQL, '');
    try
      vCount = GetAsArraySQL(vWA, '','=AAA|=BBB');
    finally
      CloseWorkArea(vWA);
    end;
   end; -- LoadToArray

22.09.2004

-      DownloadIternetFile,       Win95,    MS IE.
-           ,   ,      .  . .
-       . .
-    .     .,         ,      ,            ,       .
-    .,        ,            ..
-  ,               .
-     TextFileOpenRead,     ,      .
-      ,                ,      . ,    .
-    .             .
-      CHR.
-      ,   browser.ini    ,      .
-    ComboBox'e -     TEXT
-         . 
-       ( ,    ,   )          (.)     .
-     " "   ,      .

-       ShowTree|    ,    .   -  true,   ,   .    false - .    -  .  1.ShowTree = true
-       .
-       ""     . 
-          (  ),       ;            (   )
-    -         - - (   )
-    (   )
-    -    (. + -),             .
-           -       
-   .
-           SQL-. Ÿ      SQL-. :
  CARDFILTERTOSQL(CrdName, SQLAlias: String; CrdFilter: String|LongString; var SQLFilter: String|LongString): Logical;  SQL. :
     CrdName -  ,    SQL-.
     SQLAlias - ,        SQLFilter.     .
     CrdFilter -     .    .
     SQLFilter -      SQL-.    .
    True,        SQL-. 
   False,   SQLFilter    SQL-,   .
   .    False.
   1:  vRes = CARDFILTERTOSQL('', '', ' <> ""', vSQLFilter); -- [] <> ''
   2:  vRes = CARDFILTERTOSQL('', 'A.', ' <> ""', vSQLFilter); -- A.[] <> ''


08.09.2004

-             .
-        .
-  ,     ""   - ,     "",   " ".
-      "ClearFieldsValue",         .
-      6.7      "OpenCardFile",    ,    6.7        ,    6.9    .
-    .,      .
-  ,    "OnExit",         "Esc".
-   "Access violation", .       .
-             -                    - .
-  ,               .
-  Access Violation, .            ..
-        ().      ,      .
-  ,         RECORD  DBT.
-  ,      RECORD,   .
-   Access Violation           .
-  ,      
-   TPL ,     
-   "Access violation"    - .
-  ,         .
-     -   6.7,          ,    .
-   Access Violation  ., .  ,        ,     ,     .
-     ,       ,         200- .
-      - , . ,      ,     ,     .
-          .
-  ,                   .
-       ,      ,         .
-        ,     ,  ,  .
-      , .           ,   ""    .
-     .      ,            ,     .
-            .
-      ,        Enter     .
-      ,                  .
-   "    1  32767"    " "  MS Word.
-   "  0"    " "  MS Excel.
-         ,          .
-     ExportCard,                .
-              .
-       .,      "Assigned".
-    . ,     .
-           .
-   Access Violation,   ,    ,     .
-      Trace, Message, Hint,    ,        255 .
-     "-",      ,        .
-     "Filtered"  .
-   Access Violation      .       " ".

-       . .      .
-    CANPRINT|    .   .
-     .      .
-        .
-   " ",       "    .     ".
-        Template.
- . 6.9 .     800.
-   .
-       ,   ,      .         .
-        "",      ,  .  ,  .  .
-   -  JDF-,      ToDay.
-                (    ).     "",  " ...". 
-     . . Precision|.    (-    )   .
-          .  ,   . ,  .
-         "  ", ..          ,    .
-    .
-  . / .    .
-   "  "   :
     -   .   ,          .
      -   .   ,         ,       .
    ,           :
   -     . . .
   -    . . .    .
   -    . . .   .
   -   .
-     "".
-     .
-     ,      , .    ,          .
-     "-"    ,       .   ,       -.
-   " "   " ".
-   ""   " ".
-      .       90, 180  270 .  ,    ,   .     0    .
-     "2003"  .
-             ""   .
-   GetGUID: String; (: ;) -    .
-   func DownloadInternetFile(aUrl, aFileName: String): Logical; ().        .
  aUrl -     
  aFileName -  ,      .
   True -    .
  :
  if not DownloadInternetFile('http://www.dic.ru', 'd:\temp\index.html'):
    Message('   ...');
  end;
-    "RECORD"       "{15}".
  :
  var vRecord: Record = [{15}];
  ....
  if vRecord = {15}:
    vRecord = NIL;
  end;
-        . : 
  Trim(aStr: String): String; () --       
  TrimLeft(aStr: String): String; () --     
  TrimRight(aStr: String): String; () --     
- WordsCount(Text: String; Delimiters: String): Integer; ()      (Text)    (Delimiters).
  :
  var X : Integer;
  X = WordsCount(" ",""); -- X  5
- ExtractWord(Num:Integer; Text: String ;  Delim: String): String; ( ).   (Num)   (Text)    (Delim).
  :
  var S1 : String;
  S1 = ExtractWord(3, ",  ", " "); -- S1  ""
- ExtractWords(Num:Integer; Len:Integer; Text: String ;  Delim: String): String; ( ).    (Len)    (Num)   (Text)    (Delim).
  :
  var S1 : String;
  S1 = ExtractWord(2, 2, ",  ", " ");  -- S1  " "
- Delete(Text: String; Index: Integer; Length: Integer): String; ().    (Text)   Len    Index.
  :
  var S1 : String;
  S1 = Delete(' ', 9, 1); -- S1  ""
- Insert(SubStr: String; Text: String; Index: Integer): String; ().    (Text)  (SubStr)    Index.
  :
  var S1 : String;
  S1 = Insert(' ', ' ', 9); -- S1  "  "
- Replace(SubStr: String; Text: String; Index: Integer): String; ().    (Text)  (SubStr)    Index.
  :
  var S1 : String;
  S1 = Replace('', ' ', 10); -- S1  " "
- WordInString(Word:String; Text: String ;  Delim: String): String; ().  TRUE,   (Word)    (Text)    (Delim).
  :
  var S1 : Logical;
  S1 = WordInString("", ", ,", ","); -- S1  TRUE
-    ImportCard   ""     ,        .
-    ExportCard   ""     ,        .
-   TextFileWriteLn    . :
  TextFileWriteLn(FileNum: Integer; Str: String [;EOL: Logical]);
  : EOL -   False.  True,    ,       (  )   .   ,     .
-   InportCard    [;UseBro: Logicat] -      .  True,   ,  False,   .   True.
-       . :
  StringToNumeric(aStr: String): Numeric; ()
-         "     " HierarchicalView|.        .   -  . -    .
  :
     1.HierarchicalView = true;

30.06.2004

-  ,     "  "     "".
-    ,           .
-     .      .
-     ,             .
-  ,         " ".
-       ,       .
-  ,       ,    " "   ""  GetIsGroup  False.
-                 .
-    .,     "      ",    .              .
-  ,           "      ".
-     OpenCardFile,      BRO-    .
-            .
-    ,             .
-       ,    " "   ,      .
-       ,       " ",     .
-       GetCurrentGroupUkey.
-                   .
-          ,            .
-     " "                 lst-.
-      ,           ,       .
-              .    ,      , ..    .
-     ,           .
-     GetAsArray.      .
-    ,               ,          .
-      6.7  ,    Del       .
-    ,                  ,      .
-       CARDFILERECSIGN    .
-    .  .   MTL,            .
-         - ,               .
-         - ,            ,       .
-     ,            , .    .
-  ,    -  F4    JDF    F4      .
-     ,                 "."    .
-      . 
-      ,       .
-      ,       .
-   Access violation   -     ,            .
-   Access violation         -       "".
-   Access Violation   SortSection  .
-   Access Violation,          ,    ,     .
-   Access Violation       .
-   Access Violation   ,     -  -.
-   AccessViolation           .   .
-   Access Violation    - .
-      .,       6.SQL.

-      " "   ""     "    ".
   ,    "  "            .
      .        6.7   .
     ,          . 
         -       .
-             ,      "".
-                ,        Tables.MTL.
-  .  6.9       .
-  .  6.9      TBW.INI (       .).  ,          .
-     Tables.MTL    "INDEX"     UKEY  CardUKey  .
-     OpenBlank    NIL,    -    .
-       Records: Integer; ().    .     .
  : Trace('  ' + Str(AsInteger(CRD.Records)) + ' .');
-        .    ,     .    ,         .     DblClick.       "  ". ,        .
-       ClearFieldValues|. 1.ClearFieldValues = '';     .     ,    ,    .
-   .,        "    ".   .    ,   ,        ,   ,       .      .
-      /LOG=<FileName>.          .
-         " ...   ... ...,   ;   ".   .    ,    ,    (-)  ,    ,     .           .
-            . 
      :
         (: ; : ): ; 
      :
         TransNumSign
       :
           -      .
           -  .
              . 0 -     .
            (   ),       .

-   .   ""    "   ".   .     (MTI)         .
-        .
-     tpl     .

30.04.2004

-   Access violation      .
-      .
-     ,        .
-     ,           .      .
-       DBF-,  MEMO .
-       DBF,         UKEY.
-       RTF,      , ..      .
-    ,             .
-     ,      ,     -     .
-  ,    -   JDF        .
-   "Access violation"       .
-  ,        ,       .
-    .       .
-     .              .
-     ,   ,    "  ".       ,    .
-                  .
-     ,     ,        .
-      " "
-     .
-      ,         .
-      ,            .
-      ,               ,      .
-          ,     .
-      InsertFrame,           .
-        ,             .
-           ,               .
-        ,     "", ""      .
-           .
-    .,               ..
-    .     ,      ,           .
-    .             .
-     .       .
-    .,       ,       .
-       .,       .
-         ..

-      - Color|  . 
-   -    "CardCurrentGroupUKey" ("")      .
  : CRD.CardCurrentCurrentGroupUKey = 0;
-  ""           /     .
-    "Calculator"         . : Calculator[(aValue: Numeric)]: Numeric;
-     AfterOpen|.       (    ).
-    AsRecord ().  AsString, AsInteger  .. : AsRecord(Object.Properties:*): Record;
-         "VAR" (    ).            "DBT",     "    "     .
-           ""  , ..  ""    "",   .
-  .    MS SQL Server-     . ,    7.0  7.0 beta    sp1,      .
-  .,      (ClosedModFob),   ,    .
-  .      ClosedModFob = True,    ClosedModFob = False.
-    ,          .
-          Win2k, WinXP  .
-                 .

05.04.2004

-      OpenCardFile,    ,     bro-.
-     PlanVar,      ".".
-            ,   ,          .
-         .
-      Trunc.    ,       .
-  ,     Word (RTF)   Win 98/2000 ( 6.7  ).
-   "Access violation"   " "   ""     "".
-     ,             .
-  ,              .
          ,     .
-          ,        .
-          ,           .
-   "Access violation",    . .                   "",   .
-  "Access violation"    ,        "".
-      -  ,    .    .
-           .
-            .
-    "CurrentValue"   .
-   "Access violation"    " " (F4)  -    .

-       .
    "" ("OnCalc")   Func OnCalc(Sender: String; aUkey: Integer): String;
  Sender -   .
  aUKey -  ,    .
       ,   .
   ""         .
  !        . . 
  CRD_MyField.CurrentValue = 'Hello World' .
-      .   - . ,    - "" ("ShowTree").
  : CRD1.ShowTree = true; 
-       BringToFront|  SendToBack|
        . ,      ,    ,       .
  ,        ,     ,        ,    ,    .      ( ) ,     BringToFront. ,  ( )   SendToBack.
-    .  - "Post" ("").       .
-     .  IsEditing|.       .
-       "Name"("")    .
  : Message(AsString(Template.Name));
-   TOP, LEFT, WIDTH, HEIGHT      
-    6.9 ,      "      ".     .
    ,            .
               . 
         .
-   ,          "  ".   .
     ,          , .             .
-     TABLES.MTL,           "INDEX".
   INDEX "< >[;< >]";
              .           .
               "  " .
-          " ", " ".

15.03.2004

-     ,       ,        .
-     ,     "  ".
-              .
-   "Access violation",    .
-    .    . 
-        PlanVar.
-    ,        ,     .
-      OpenCardFile    -  -,       .
-       .
-        ,        CreatedUser, ModifiedUser.
-   "Access violation"          ,    .
-     ,             CreatedUser, ModifiedUser.
-  ,              .     -  ,      .
-  ,           .
-       ,            .
-            ,        .
-       ,       .
-       ,      .
-                   .
-  ,     ,          .
-     " ",    "",    ""   .
-  ,       ,  ,           .
-     ,   ALT+Enter         .
-     ,   Ctrl+Enter 2   - .
-    ,   Ctrl+Delete     ,        ,     ,         .
-      ,          ,    .
-     ,                     .
-        ,           ,     .
-  ,    -,    -     " ", " ".
-  ,   F9      .

-   -    " ",    /, ,  ,  ,                   pro-.           .
-   " "   ""   ""   :
  "   (  )".    .
     ,      .        ""  
   3  :  ׸,  Ҹ-,  -. 
               .
-   " "   ""   ""   :
    .   .    ,        .
  ,    ,   "  "     .
     ,       /.
-       "  "   : "", "".          .
  ..    ,   ,       .
-           /  -  (LoadJurTab),  (SaveJurTab). 
     -    .    -  .  ,    .

25.02.2004

-                ,      .
-             "".           .
-      DBF         .   1   ,     -,      -   .       .
-          MS Excel.
-     'SearchInArray'     '' (  ).
-  ,    -       2   .
-  ,   ,     ,       .       .
-      ,          ".Lis"   "AddCount.lis".
-       .
-      ,             .
-      ,       <ENTER>   .
-      ,          .
-      ,          .
-       Access Violation     "",
-      ,      ,      ,      .
-      ,               .
-      "",       .
-     ,  ,    ,  ,    -     .
-     ,    .
-     ,      .
-     ,        .
-         ,    ,     -    .    .
-      ,       .
-      ,     .
-     ,               .
-      ,   BackSpace      " ".
-     ""   .      ,   "".   .
-     ,        - ,     .
-   "    "   ,         .
-               .

04.02.2004

-         ,     ,     .
-       .
-           ,      .
-   "Access violation"       .
-   "Access Violation"       .
-   "Access Violation"       .
-   "Access Violation"        ALT+Enter.
-      ,        .
-          ,        ,       ,      .
-      - ,       JDF  .
-           .
-    ,   Ctrl+Del     .
-   "Access Violation"        "".-     -.

-   "  ".  "  ", " "    .
             "..."        .   " "    "  ". 
    ,     - ,    .
-       .
-   " ",   "",        ,     ""  "Caption".
-   -   (  )    ""  "".  : 'Activate',''; 'Port','';
-   'SearchInArray'     .    "" ("   "), ,  .
-    'SearchInArray'    ,    .   'SearchInArray'(''):
  SearchInArray(:; : [; :[; :]]): ;
   :
     -     
     -   
     -   .  ,    ,  ,    ,      .   - .
     -  ,    .   - 1.
     :     -1,    ,  
-       ESC   - .

26.01.2004

-   "      ", .       .
-     ,        Ctrl+Del . '???',     .
-      ,           .
-      ,    ,      ,     .
-       CellLink,         .
-     ,    .   -     ,   ,    ,     .
-   "Acces violation"  . , .     -,      , .    .
-        ,     ,  .  ,   .
-      ,       ,     .
-   "Access violation"   ,          .
-   "Access violation",          " \ ".
-  b         .
-     ImportCard    .
-     ,             .
-      "WriteVarInDBT",    ,      ,       .
-           .
-   "Access violation"    ,      .
-   "Access violation"    ,         .
-       ,    ""         ,       .
-     " "  ,       .
-         ,         6.7    6.9       .
-   "Access violation"  .    .,       .

-       .
-     .
-      CellLink    2-    1   ,         2- .
-            .           .
-             Ctrl-Break.
- .              .
-   " "  "",                         :  ,  ,  ,  ,  .     ,      .
-     InsertFrame (). :
  ( :  | ;  : ):;
     InsertFrame   ,       .
  ,       .
-         "  ".     .   ,       .   ,       .
-         -     ".."        .  ,    .       -          ()  "OpenCardFile".  ..      ,   .    .
-     ,          .
-        ,  .         .       " " -     .
-   " "   ""    "  ".
-     -    .
-              :
  " " -     .
  "  - " -        .
-         "    ".    .   ,                 .
-   RepOpen     .
-   " "        .     "  ", . ,    " ",      .
-   ,          :
    -     .
    -      .
     -       .
  ... -       .
         .  ,     .
      ,      ,  . 
           "",           .
      ""  .
-         " "      .
-                     .
-         :
  GETFREEZDATEBEGIN: Date;  : ; -        ,    .
  GETFREEZDATEEND: Date;      : ;    -        ,    .
  GETFREEZJURNAL: String;         : ;      -          ,    .

30.12.2003

-            .
-     ,        ,          .
-  ,          ().
-  ,       -  ,   ,        .
-      ,       ,    ,    .
-  ,        , .    ,  .   .
-          .
-      .
-         "  ".
-   ,     . : (<_>): logical; :ISBLANKOPEN(<_>): logical;
-       "  "  "",             :
  , , ,  ,  ,  ,  .     ,      .
-          "".   ,                ,         .
-             .
-              " " (Ctrl+Del).     .
-         "".   ,   .  .         .
-   'ImportCard','ImportBase'      -      (   ,       ).  :
  (:; :; :; :; :; DOS:; :; :; : [; :]);
  (:; :; :; DOS:; :; :; : [; :]);
-        " ",           ,      .     ,       ,   ,        ,   .
-     .
-    ,   ""   ""         ""    " "    " ".
     .    ,          .
-   -         ,       , .      .
        ,  .        .          .
    .   " "     .   .   ,       .
      "" / " ...".         .
    "  () "        ,  .    .
   ,     ,          .
   ""      .       .
         ,   " ",   "" .
            , .     ,    ,       .
-   "  () "    "  ",       .
               .   ,  F4           .
-           ,   F4 (" ")   .

17.12.2003

-    ,     ""   .
-    . ,           - .            .
-      .   ,       .
-   - AsReal.
-        .     .       ,    .     ()   .
-          .   .
-  'InsertInArraySort' (       )  .     .   - .  -  ,      .
-     . . CELLHINT . .       .
-         .
-     (   ).
-   .
-     -,            -.
-     .        ,        .            .
-    -  ModalMode.      False,      .
-           .        .   Win9x.
-     ,        .
-     ".".
-   :
      'ieRTF''' - RTF
      'ieWord''' - MS Word (  OLE)
      'ieHTML''' - HTML
      'ieExcel''' - MS Excel (  OLE)
      'ieText''' -    ( CRD)
      'ieCRD''' - CRD (   )
      'ieDBF''' - DBF
-  :
      'ExportCardDBF'''
      'ExportBaseDBF'''
      'ExportCardExcel'''
      'ExportRTF'''
      'ExportWord'''
      'ExportHTML'''
      'ImportWord'''
      'ImportText'''
      'ExportExcel'''

         :

      'ExportCard''' -  .
       :
       ieCRD,ieDBF,ieExcel
      :
       (:; :; :; :; :; :; :; :; :; DOS:; :);
       :
        -   (.)
        -   ,      *.crd;
        -    (     )    (    *.crd   ),    ;
        -    ,     ();
        -      ()    ();
        -    ();
        -  ,   (Ukey)   ()   ();
        -       MS Excel ()   ().    ieExcel;
        -   CreateTime, UpdateTime, CreatedUser, ModifiedUser ()   ();
       DOS -     DOS ()    Windows ().    ieExcel;
        -     ()    ().

      'ExportBase''' -    
       :
       ieCRD,ieDBF,ieExcel
      :
       (:; :; :; :; DOS:);
       :
        -   (.)
        -    (     )    (    *.crd   ),    ;
        -       MS Excel ()   (); (   ieExcel)
        -   CreateTime, UpdateTime, CreatedUser, ModifiedUser ()   ();
       DOS -     DOS ()    Windows (); (   ieExcel)

      'ExportBlank''' (  !!! ) -  
       :
       ieRTF, ieWord, ieHTML, ieExcel
      :
       (:; :; : [; :]);
       :
        -   (.)
        -   ( ),      *.rtf;
        -    (     )    (    *.rtf   ),    ; 
        -  ,     "",          .     "",    

      'ImportBlank''' (  !!! ) -  
       :
       ieWord, ieText
      :
       (:; :; :; :; :);
       :
        -   (.)
        -   ( ),      MS WORD (   doc);
        -    (     )    (    *.doc   ),    . 
        -  ,     "",      ,  -  ;
        -  ,     "",        ,    .    ieText

      :   'ExportBase'  'ExportCard'   ieCRD
       ieDBF         (*.cdf)

-        :
      'ovrRepl''' -     
      'ovrAdd''' -     
      'ovrNew''' -     
      'ovrNone''' -     

-   :
      'ImportCard''' -  .
       :
       ieCRD,ieDBF
      :
       (:; :; :; :; :; DOS:; :; :; :);
       :
        -   (.)
        -   ,      *.cdf;
        -    (     )    (    *.cdf   ),    ;
        -      ()    ();
        -   CreateTime, UpdateTime, CreatedUser, ModifiedUser ()   ();
       DOS -     DOS ()    Windows ().    ieExcel;
        -  .  True   () 
        -    .
        -   

      'ImportBase''' -    
       :
       ieCRD,ieDBF
      :
       (:; :; :; DOS:; :; :; :);
       :
        -   (.)
        -    (     )    (    *.cdf   ),    ;
        -   CreateTime, UpdateTime, CreatedUser, ModifiedUser ()   ();
       DOS -     DOS ()    Windows (); (   ieExcel)
        -  .  True   () 
        -    . . . 1
        -   

      :         (*.cdf)

-                .
-          ,        ,    .
-            ,          .
-  .                          .         ,        .         ,          ,             .       ,          ,               . 
           ,                      .

10.11.2003

-       ,       .
-   'PRINTCARDBLANK', '',  -    .
       'PRINT'
       (: ; :  [;:  [;  :  ] ]);
       :
        -  ; 
        -  ;
        -    ;
        -  ,    .
     :      -
-   'InsertInArraySort'('') -     ,   .
           'InsertInArray'
       InsertInArraySort(: ; : );
       :
         ()
         (  )
          ,     , 
        1 )
-         .
-        .
  :   ,   (   ) -    ().
-    . ,      .
-           ,    .
-   ,   -     DBT   'DBT'. 
           .
-        - .
-     /, /D   .
-   "  "   .    Readme.txt  .
-      BLANKS.$$$      .
-      OpenCardFile,   -   ,    .
-         ,      AddCounts.lis,    2 .
-         .
-   'PRINT'  3   :
        :  -     (True - , False - )
        :  - ,     
        :  - ,     
   :
      (:  [;:  [;  :  [;  :  [;  :  [;  :  ] ] ] ] ]);
        " " .
      :      "" ,    ,    "".
-    .   ,    6.7/6.SQL.
-       ,       .
-  ,    -     .
-           .
-    ""    .   -.
-        ConvertAsType.
-  ,             .

28.10.2003

-   " " 6.9.
