home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a044 / 3.ddi / MISC / EXAMINE.PRG < prev    next >
Encoding:
Text File  |  1993-08-31  |  43.6 KB  |  1,215 lines

  1. *:*****************************************************************************
  2. *:
  3. *: Procedure file: C:\DBFAST20\EXAMINE.PRG
  4. *:
  5. *:         System: Clipper Source Code Examiner
  6. *:         Author: Ed Chyzowski
  7. *:      Copyright (c) 1992, Computer Associates
  8. *:  Last modified: 12/10/92     
  9. *:
  10. *:  Procs & Fncts: EXAMINE_GETEVENT()
  11. *:               : EXAMINE_TRANSLATE()
  12. *:               : EXAMINE_ACTION
  13. *:               : CHECK()
  14. *:               : STANDARDCHECK()
  15. *:               : NONSTANDARDCHECK()
  16. *:               : CHECKFUNCTIONS()
  17. *:               : CHECKCOMMANDS()
  18. *:               : MULTDECLARE()
  19. *:               : CHECKINCLUDE()
  20. *:
  21. *:          Calls: DBFMENU()          (function  in DBFNRUN.EXE)
  22. *:               : WARNING()          (function  in DBFNRUN.EXE)
  23. *:               : EXAMINE_GETEVENT() (function  in EXAMINE.PRG)
  24. *:               : EXAMINE_TRANSLATE()(function  in EXAMINE.PRG)
  25. *:               : EXAMINE_ACTION     (procedure in EXAMINE.PRG)
  26. *:               : STANDARDCHECK()    (function  in EXAMINE.PRG)
  27. *:               : NONSTANDARDCHECK() (function  in EXAMINE.PRG)
  28. *:               : MULTDECLARE()      (function  in EXAMINE.PRG)
  29. *:               : CHECKINCLUDE()     (function  in EXAMINE.PRG)
  30. *:               : CHECKFUNCTIONS()   (function  in EXAMINE.PRG)
  31. *:               : CHECKCOMMANDS()    (function  in EXAMINE.PRG)
  32. *:
  33. *:    Other Files: INFILENAME
  34. *:               : OUTFILENAME
  35. *:
  36. *:  
  37. *:*****************************************************************************
  38.  
  39.  
  40.  
  41.  
  42. SET PROCEDURE TO EXAMINE
  43. SET EVENTMSK TO 159
  44.  
  45.  
  46. set erase video to 112
  47. ERASE
  48.  
  49. SET WINDOW TITLE TO "Clipper Source Code Examiner"
  50.  
  51. PUBLIC nCurrentLine
  52. PUBLIC Message
  53. PUBLIC ProblemLine
  54. PUBLIC MultLineComment
  55. PUBLIC CRLF
  56.  
  57. STORE 0  TO nTheMenu, nTheOption, nTheKey
  58. STORE '' TO sTheWindow, sTheButton
  59. SVAR            = SPACE(25)
  60. CRLF            = CHR(13)+CHR(10)
  61. Message         = ""
  62. MultLineComment = .F.
  63. ProblemLine     = .F.
  64. sCurrentline     = Space(255)
  65. ncurrentline     = 0
  66. nReadBytes      = 1
  67. cCheckLine      = "CA-dBFast 2.0 Conversion Message:  Check Line Below "
  68.  
  69.  
  70. CREATE CONTROL GROUPBOX "Group1" AT 0,0 SIZE 12,55 TEXT "File Status"
  71. CREATE BUTTON "Cancel" AT 1,57 SIZE 2,18
  72. CREATE CONTROL TEXT "Text4" AT 2,12 TEXT "Program Name" COLOR 117 FONT 0
  73. CREATE CONTROL TEXT "Perc" AT 3,12 TEXT  "    Progress" COLOR 117 FONT 0
  74. CREATE CONTROL TEXT "Text5" AT 4,5 TEXT "Current Line Number" COLOR 117 FONT 0
  75. CREATE CONTROL TEXT "TextB" AT 5,5 TEXT "   Total Line Bytes" COLOR 117 FONT 0
  76. CREATE BUTTON "New File" AT 4,57 SIZE 2,18 PLAIN
  77. CREATE BUTTON "Quit" at 8,57 SIZE 1,18 PLAIN
  78.  
  79. CREATE CONTROL TEXT "Text6" AT 7,3 TEXT "Destination File Name" COLOR 126 FONT 0
  80. CREATE CONTROL TEXT "Write" AT 9,3 TEXT "       Current Action" COLOR 117 FONT 0
  81. CREATE CONTROL TEXT "Text1" AT 13,1 TEXT "Examination Status" COLOR 112 FONT 0
  82. CREATE CONTROL EDITBOX "Edit1" AT 14,0 SIZE 12,78 SAVE TO M->MESSAGE COLOR 240
  83.  
  84. UPDATE CONTROL ALL
  85.  
  86. sAction = '?'
  87.  
  88. SET CURSOR TO ARROW
  89. CheckingFiles = .t.
  90. DISABLE BUTTON 'New File'
  91.  
  92. DoTheRightThing = About()
  93. If .not. DoTheRightThing
  94.     Return
  95. Endif
  96.  
  97.  
  98. DO WHILE CheckingFiles
  99.       
  100.    Message = ""
  101.    infilename = DBFMENU("Program Files,*.PRG","Enter Program to Examine",1)
  102.    
  103.    if Empty(inFileName)
  104.       Exit
  105.    Endif
  106.    
  107.    ninhandle = FOPEN(infilename)
  108.    If ninhandle = -1
  109.       Warning("Unable to Continue","File Error",3)
  110.       Exit
  111.    ENDIF
  112.    
  113.    Set SAY VIDEO to 112
  114.  
  115.    TotalFileBytes = FILESIZE(infilename)
  116.    CurrentFileBytes = 0
  117.  
  118.    outfilename = SUBSTR(infilename,1,AT(".",infilename)-1)+".D20"
  119.    Message = "Generating New File "+outfilename
  120.    nOuthandle = FCREATE(outFilename)
  121.    IF nOutHandle = -1
  122.       Warning("Unable to Continue","Cannot Create External File",3)
  123.       Exit
  124.    ENDIF
  125.    
  126.    set say video to 112
  127.    if len(infilename)>25
  128.         @ 2,26 SAY substr(infilename,len(infilename)-24,25)    
  129.            @ 7,26 SAY substr(outfilename,len(outfilename)-24,25) 
  130.    else
  131.            @ 2,26 say infilename
  132.            @ 7,26 say outfilenamd
  133.    endif
  134.    
  135.    DO WHILE .NOT. EMPTY(sAction) .and. nReadBytes > 0
  136.       
  137.       nEvent  = EXAMINE_GetEvent()
  138.       
  139.       * UPDATE CONTROL 'Edit1'
  140.       
  141.       If nEvent <> -1
  142.          
  143.          sAction = EXAMINE_Translate(nEvent)
  144.          DO EXAMINE_Action
  145.          
  146.       Else
  147.          
  148.          @ 9,26 say "Reading........."
  149.          nReadBytes = FGETS(@sCurrentLine,250,ninHandle)
  150.          
  151.          @ 5,26 say Transform(nReadBytes,"999,999")
  152.          
  153.          If nReadBytes > 0
  154.             
  155.             CurrentFileBytes = CurrentFileBytes+nReadBytes+2
  156.             @ 3,26 say Transform((CurrentFileBytes/TotalFileBytes)*100,"999.9")+" %"
  157.             
  158.             Inc nCurrentLine
  159.             * Removed this line due to length bug in Dec version of 2.0
  160.             * Message = Message+CRLF+"Line "+Transform(nCurrentLine,"9999")
  161.             @ 4,26 SAY Transform(nCurrentLine,"999,999")
  162.             
  163.             If SubStr(sCurrentLine,1,1) <> "*"
  164.                
  165.                nOffset = 0
  166.                
  167.                sCurrentLine = StandardCheck(sCurrentLine)
  168.                
  169.                sCurrentLine = NonStandardCheck(sCurrentLine)
  170.                
  171.                sCurrentLine = MultDeclare(SCurrentLine)
  172.                
  173.                sCurrentLine = CheckInclude(sCurrentLine)
  174.                
  175.                sCurrentLine = CheckFunctions(sCurrentLine)
  176.                
  177.                sCurrentLine = CheckCommands(sCurrentLine)
  178.                
  179.                
  180.             Else
  181.                
  182.                * Comment Line (Skipping)
  183.                
  184.             Endif
  185.             
  186.             @ 9,26 say "Writing........."
  187.             
  188.             If MultLineComment
  189.                nBytesWritten = FPUTS("* "+sCurrentLine,nOutHandle)
  190.             else
  191.                If ProblemLine
  192.                   nBytesWritten = FPUTS("*:DB20?  "+sCurrentLine,nOutHandle)
  193.                else
  194.                   nBytesWritten = FPUTS(sCurrentLine,nOuthandle)
  195.                Endif
  196.             Endif
  197.             
  198.             * Reset ProblemLine Value to .F. after each write
  199.             ProblemLine = .F.
  200.             
  201.             If nBytesWritten < 1
  202.                Message("Problems Writing","To "+OutFile)
  203.             endif
  204.             
  205.          Endif
  206.          
  207.          If nReadBytes = 0 .and. ( FERROR() <> 39 .and. FERROR() <> 83 )
  208.             nBytesWritten = FPUTS("",nOutHandle)
  209.             nReadBytes = 1
  210.          endif
  211.          
  212.          
  213.          
  214.       ENDIF
  215.       
  216.       
  217.       sAction = '?'
  218.       
  219.       
  220.    ENDDO
  221.    
  222.    Message = Message+CRLF+"Closing Files"
  223.  
  224.    FClose(nInHandle)
  225.    FClose(nOuthandle)
  226.    @ 3,26 say Transform(100,"999.9")+" %"
  227.    @ 9,26 say "Done............"
  228.    UPDATE CONTROL 'Edit1'
  229.     
  230.    Warning("CLOSE","Finished Examining"+inFilename,388)
  231.    
  232.    ENABLE BUTTON 'New File'
  233.    DISABLE BUTTON 'Cancel'
  234.    
  235.    Do While .T.
  236.       nEvent = -1
  237.       nEvent = Chkevent()
  238.       If nEvent = 6
  239.          If Button() = 'Quit'
  240.             CheckingFiles = .F.
  241.             Exit
  242.          endif
  243.          If Button() = 'New File'
  244.             CheckingFiles = .t.
  245.             nReadBytes=1
  246.             Exit
  247.          Endif
  248.       endif
  249.    enddo      
  250.    
  251.       
  252. ENDDO
  253.  
  254.  
  255. QUIT
  256.  
  257.  
  258.  
  259.  
  260. *!*****************************************************************************
  261. *!
  262. *!       Function: EXAMINE_GETEVENT()
  263. *!
  264. *!      Called by: EXAMINE.PRG                       
  265. *!
  266. *!          Calls: CHKEVENT()         (function  in ?)
  267. *!               : HMENU()            (function  in ?)
  268. *!               : VMENU()            (function  in ?)
  269. *!               : BUTTON()           (function  in ?)
  270. *!
  271. *!*****************************************************************************
  272. FUNCTION EXAMINE_GetEvent()
  273.    
  274.    PRIVATE nTheEvent
  275.    
  276.    nTheEvent = CHKEVENT()
  277.    nTheRow    = MROW()
  278.    nTheCol    = MCOL()
  279.    nTheMenu   = HMENU()
  280.    nTheOption = VMENU()
  281.    nTheKey    = LASTKEY()
  282.    sTheButton = BUTTON()
  283.    RETURN(nTheEvent)
  284.  
  285.  
  286.  
  287. *!*****************************************************************************
  288. *!
  289. *!       Function: EXAMINE_TRANSLATE()
  290. *!
  291. *!      Called by: EXAMINE.PRG                       
  292. *!
  293. *!*****************************************************************************
  294. FUNCTION EXAMINE_Translate()
  295.    
  296.    PARAMETER nTheEvent
  297.    PRIVATE sTheAction
  298.    
  299.    sTheAction = ' '
  300.    DO CASE
  301.    CASE nTheEvent = eClose
  302.       sTheAction = 'CLOSE'
  303.       
  304.       
  305.    CASE nTheEvent = eButton
  306.       DO CASE
  307.       CASE sTheButton = 'Cancel'
  308.          sTheAction = 'Cancel'
  309.       CASE sTheButton = 'Resume'
  310.          sTheAction = 'Resume'
  311.       ENDCASE
  312.       
  313.    OTHERWISE
  314.       sTheAction = '?'
  315.    ENDCASE
  316.    RETURN(sTheAction)
  317.  
  318.  
  319.  
  320. *!*****************************************************************************
  321. *!
  322. *!      Procedure: EXAMINE_ACTION
  323. *!
  324. *!      Called by: EXAMINE.PRG                       
  325. *!
  326. *!          Calls: WARNING()          (function  in ?)
  327. *!
  328. *!*****************************************************************************
  329. PROCEDURE EXAMINE_Action
  330.    
  331.    
  332.    DO CASE
  333.    CASE sAction = 'CLOSE'
  334.       sAction = ''
  335.       
  336.    CASE sAction = 'Cancel'
  337.       nRetVal = Warning("CANCEL Selected","Are you sure?",3)
  338.       If nRetVal = 1
  339.          * Selected OK
  340.          sAction = ''
  341.       Endif
  342.       
  343.    ENDCASE
  344.    RETURN
  345.  
  346.  
  347.  
  348.  
  349. *!*****************************************************************************
  350. *!
  351. *!       Function: CHECK()
  352. *!
  353. *!      Called by: STANDARDCHECK()    (function  in EXAMINE.PRG)
  354. *!               : NONSTANDARDCHECK() (function  in EXAMINE.PRG)
  355. *!               : CHECKFUNCTIONS()   (function  in EXAMINE.PRG)
  356. *!               : CHECKCOMMANDS()    (function  in EXAMINE.PRG)
  357. *!               : MULTDECLARE()      (function  in EXAMINE.PRG)
  358. *!               : CHECKINCLUDE()     (function  in EXAMINE.PRG)
  359. *!
  360. *!*****************************************************************************
  361. FUNCTION Check
  362.    Parameters ForWhat, InWhat
  363.    RETURN( AT(UPPER(ForWhat),UPPER(InWhat)) )
  364.  
  365.  
  366. *!*****************************************************************************
  367. *!
  368. *!       Function: STANDARDCHECK()
  369. *!
  370. *!      Called by: EXAMINE.PRG                       
  371. *!
  372. *!          Calls: CHECK()            (function  in EXAMINE.PRG)
  373. *!
  374. *!*****************************************************************************
  375. FUNCTION StandardCheck
  376.    PARAMETERS InStr
  377.    @ 9,26 say "Standard Check.."
  378.    
  379.    
  380.    ChByte = Check("ErrorLevel(",InStr)
  381.    If chbyte > 0
  382.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting ERRORLEVEL at byte "+Transform(chbyte,"999")
  383.       InStr = STRTRAN(inStr,SUBSTR(InStr,Chbyte,Len("ErrorLevel(")),"Error(")
  384.    endif
  385.    
  386.    ChByte = Check("!=",InStr)
  387.    If ChByte > 0
  388.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting != to <> at byte "+Transform(chByte,"999")
  389.       InStr = STRTRAN(inStr,"!=","<>")
  390.    Endif
  391.    
  392.    ChByte = Check("SELECT 0",InStr)
  393.    if ChByte > 0
  394.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Message: Check Work Areas at this line"
  395.       cPrLine = "* CA-dBFast 2.0 Conversion Message:  Check Line Below"+CRLF
  396.       cAfLine = CRLF+"* Check Line Above and Revise"
  397.       InStr = cPrLine+InStr+cAfLine
  398.    Endif
  399.    
  400.    ChByte = Check("!",InStr)
  401.    If ChByte > 0
  402.       OK2Change = .T.
  403.       For ExamineByte = Iif(ChByte-3 < 1,1,ChByte-3) to iif(chByte+3 > Len(InStr),Len(InStr),ChByte+3 )
  404.          If SubStr(InStr,ExamineByte,1) = "'" .or.;
  405.                SubStr(InStr,ExamineByte,1) = '"'
  406.             Ok2Change = .F.
  407.          Endif
  408.       NEXT
  409.       if OK2Change
  410.          Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting ! to .NOT. at byte "+Transform(chByte,"999")
  411.          InStr = STRTRAN(inStr,"!=","<>")
  412.       Endif
  413.    Endif
  414.    
  415.    ChByte = Check("==",InStr)
  416.    If ChByte > 0
  417.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting == to = at byte "+Transform(chByte,"999")
  418.       InStr = STRTRAN(inStr,"==","=")
  419.    Endif
  420.    
  421.    ChByte = Check("End",InStr)
  422.    if ChByte > 0      
  423.       If AllTrim(upper(InStr)) = "END"
  424.             Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Message: Check END for ENDDO/ENDIF at this line"
  425.             cPrLine = "*:DB20? Conversion Message:  Check Line Below ENDIF/ENDDO"+CRLF
  426.             cAfLine = CRLF+"*:DB20? Check Line Above and Revise"
  427.             InStr = cPrLine+InStr+cAfLine
  428.             Release cPrLine
  429.             Release cAfLine
  430.          Endif
  431.       Endif
  432.       
  433.    
  434.    ChByte = Check("While",InStr)
  435.    If chbyte > 0
  436.       SecondCheck = Check("DO WHILE",InStr)
  437.       If SecondCheck < 1    && Didn't find a DO WHILE
  438.          nNumQuotes = 0
  439.          For ExamineByte = 1 to chByte
  440.             if SubStr(InStr,ExamineByte,1) = "'" .or. ;
  441.                   SubStr(InStr,ExamineByte,1) = '"'
  442.                Inc nNumQUotes
  443.             endif
  444.          NEXT
  445.          If ((nNumQuotes/2 = Int(nNumQuotes/2)) .or. nNumQuotes = 0) .and. ;
  446.             LEFT(UPPER(INSTR),5) <> "WHILE"
  447.             Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting WHILE to DO WHILE at byte "+Transform(chbyte,"999")
  448.             cPrLine = "*:DB20? Conversion Message:  Check Line Below for DO WHILE "+CRLF
  449.             cAfLine = CRLF+"*:DB20? Check Line Conversion Above"
  450.             InStr = cPrLine+STRTRAN(upper(instr),"WHILE","DO"+" "+"WHILE")+cAfLine
  451.          Endif
  452.          
  453.       Endif
  454.       Release SecondCheck
  455.    endif
  456.    
  457.    ChByte = Check(":=",InStr)
  458.    If ChByte > 0
  459.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting := to = at byte "+Transform(chByte,"999")
  460.       InStr = STRTRAN(inStr,":=","=")
  461.    Endif
  462.    
  463.    ChByte = Check("*/",InStr)
  464.    If ChByte > 0
  465.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting */ to * at byte "+Transform(chByte,"999")
  466.       MultLineComment = .F.
  467.       InStr = STRTRAN(inStr,"*/","*")
  468.    Endif
  469.  
  470.    ChByte = Check("/*",InStr)
  471.    If ChByte > 0
  472.        MultLineComment = .T.
  473.         Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting /* to * at byte "+Transform(chByte,"999")
  474.        InStr = STRTRAN(inStr,"/*","*")
  475.    Endif
  476.  
  477.    
  478.    ChByte = Check("//",InStr)
  479.    If ChByte > 0
  480.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting // to "+CHR(38)+CHR(38)+" at byte "+Transform(chByte,"999")
  481.       InStr = STRTRAN(inStr,"//",CHR(38)+CHR(38))
  482.    Endif
  483.    
  484.    ChByte = Check("**",InStr)
  485.    If ChByte > 0
  486.       IF ASC(SubStr(InStr,ChByte+3,1)) < 48 .and. ASC(SubStr(inStr,ChByte+3,1)) > 57
  487.          Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting ** to ^ at byte "+Transform(chByte,"999")
  488.          InStr = STRTRAN(inStr,"**","^")
  489.       Endif
  490.    Endif
  491.    
  492.    ChByte = Check("%",InStr)
  493.    If ChByte > 0
  494.       IF ASC(SubStr(InStr,ChByte+1,1)) >= 48 .and. ASC(SubStr(inStr,ChByte+1,1)) <= 57
  495.          Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting % to \ at byte "+Transform(chByte,"999")
  496.          InStr = STRTRAN(inStr,"%","\")
  497.       Endif
  498.    Endif
  499.    return(InStr)
  500.  
  501. *!*****************************************************************************
  502. *!
  503. *!       Function: NONSTANDARDCHECK()
  504. *!
  505. *!      Called by: EXAMINE.PRG                       
  506. *!
  507. *!          Calls: CHECK()            (function  in EXAMINE.PRG)
  508. *!
  509. *!*****************************************************************************
  510. FUNCTION NonStandardCheck
  511.    Parameters InStr
  512.    @ 9,26 say "NonStandard....."
  513.    
  514.    
  515.    
  516.    ChByte = Check("Replace Field_Name",InStr)
  517.    If ChByte > 0
  518.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking FIELD_NAME at byte "+Transform(chByte,"999")
  519.       InStr = STRTRAN(inStr,SubStr(InStr,ChByte,Len("Replace Field_name")),"* Replace Field_Name")
  520.    Endif
  521.    
  522.    
  523.    ChByte = Check("Replace Field_Type",InStr)
  524.    If ChByte > 0
  525.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking FIELD_TYPE at byte "+Transform(chByte,"999")
  526.       InStr = STRTRAN(inStr,SubStr(InStr,ChByte,Len("Replace Field_Type")),"* Replace Field_Type")
  527.    Endif
  528.    
  529.    
  530.    ChByte = Check("Replace Field_Len",InStr)
  531.    If ChByte > 0
  532.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking FIELD_LEN  at byte "+Transform(chByte,"999")
  533.       InStr = STRTRAN(inStr,SubStr(InStr,ChByte,Len("Replace Field_LEN")),"* Replace Field_Len")
  534.    Endif
  535.    
  536.    
  537.    ChByte = Check("Replace Field_Dec",InStr)
  538.    If ChByte > 0
  539.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking FIELD_DEC at byte "+Transform(chByte,"999")
  540.       InStr = STRTRAN(inStr,SubStr(InStr,ChByte,Len("Replace Field_Dec")),"* Replace Field_Dec")
  541.    Endif
  542.    
  543.    
  544.    ChByte = Check("#DEFINE",InStr)
  545.    If ChByte > 0
  546.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Checking DEFINE Statements"
  547.       LineOK = .T.
  548.       FOR ExamineByte = 7 to Len(InStr)-1
  549.          tst=UPPER(SubStr(InStr,ExamineByte,1))
  550.          nVal = AT(tst,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")
  551.          If nVal > 0
  552.             TestVal = "["+SubStr(inStr,ExamineByte-1,3)+"]"
  553.             If SubStr(InStr,ExamineByte-1,1)$" "+CHR(8) .and. ;
  554.                   SubStr(InStr,ExamineByte+1,1)$" "+CHR(8)
  555.                LineOK = .F.
  556.                Exit
  557.             Endif
  558.             
  559.          Endif
  560.       NEXT
  561.       If .not. LineOK
  562.          Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #DEFINE line at byte "+Transform(chByte,"999")
  563.          InStr="*:DB20? Check #DEFINE Line Below for Reserved Letter"+CRLF+inStr
  564.       Endif
  565.       Release LineOK
  566.    Endif
  567.    
  568.    
  569.    
  570.    ChByte = Check("Type(",InStr)
  571.    If ChByte > 0
  572.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking TYPE() Function at byte "+Transform(chByte,"999")
  573.       InStr = "*:DB20? Warning. TYPE() Functions must return results to Variables."+CRLF+InStr
  574.    Endif
  575.    
  576.    Return(InStr)
  577.  
  578.  
  579.  
  580.  
  581.  
  582. *!*****************************************************************************
  583. *!
  584. *!       Function: CHECKFUNCTIONS()
  585. *!
  586. *!      Called by: EXAMINE.PRG                       
  587. *!
  588. *!          Calls: CHECK()            (function  in EXAMINE.PRG)
  589. *!
  590. *!*****************************************************************************
  591. FUNCTION CheckFunctions
  592.    Parameters InStr
  593.    
  594.    @ 9,26 say "Functions......."
  595.    
  596.    
  597.    ChByte = Check("ACHOICE(",InStr)
  598.    If ChByte > 0
  599.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  600.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  601.    Endif
  602.    
  603.    
  604.    ChByte = Check("ADEL(",InStr)
  605.    If ChByte > 0
  606.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  607.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  608.    Endif
  609.    
  610.    ChByte = Check("AINS(",InStr)
  611.    If ChByte > 0
  612.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  613.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  614.    Endif
  615.    
  616.    ChByte = Check("ALIAS(",InStr)
  617.    If ChByte > 0
  618.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  619.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  620.    Endif
  621.    
  622.    ChByte = Check("ALTD(",InStr)
  623.    If ChByte > 0
  624.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  625.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  626.    Endif
  627.    
  628.    ChByte = Check("ASORT(",InStr)
  629.    If ChByte > 0
  630.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  631.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  632.    Endif
  633.    
  634.    ChByte = Check("BIN2L(",InStr)
  635.    If ChByte > 0
  636.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  637.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  638.    Endif
  639.    
  640.    ChByte = Check("BIN2W(",InStr)
  641.    If ChByte > 0
  642.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  643.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  644.    Endif
  645.    
  646.    ChByte = Check("DBEDIT(",InStr)
  647.    If ChByte > 0
  648.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  649.       InStr = "*:DB20? Function below not Available.  Use CREATE OBJECT BROWSE"+CRLF+InStr
  650.    Endif
  651.    
  652.    ChByte = Check("DBFILTER(",InStr)
  653.    If ChByte > 0
  654.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  655.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  656.    Endif
  657.    
  658.    ChByte = Check("DBRELATION(",InStr)
  659.    If ChByte > 0
  660.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  661.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  662.    Endif
  663.    
  664.    
  665.    ChByte = Check("DBRSELECT(",InStr)
  666.    If ChByte > 0
  667.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  668.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  669.    Endif
  670.    
  671.    ChByte = Check("HEADER(",InStr)
  672.    If ChByte > 0
  673.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  674.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  675.    Endif
  676.    
  677.    ChByte = Check("I2BIN(",InStr)
  678.    If ChByte > 0
  679.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  680.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  681.    Endif
  682.    
  683.    ChByte = Check("IF(",InStr)
  684.    If ChByte > 0
  685.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  686.       InStr = "*:DB20? Function below not Available. Use IFF()/IFN()/IFC()"+CRLF+InStr
  687.    Endif
  688.    
  689.    ChByte = Check("ISPRINTER(",InStr)
  690.    If ChByte > 0
  691.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  692.       InStr = "*:DB20? Function below not Available. Use PRNTSTAT()"+CRLF+InStr
  693.    Endif
  694.    
  695.    ChByte = Check("L2BIN(",InStr)
  696.    If ChByte > 0
  697.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  698.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  699.    Endif
  700.    
  701.    ChByte = Check("MLPOS(",InStr)
  702.    If ChByte > 0
  703.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  704.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  705.    Endif
  706.    
  707.    ChByte = Check("PCOUNT(",InStr)
  708.    If ChByte > 0
  709.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  710.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  711.    Endif
  712.    
  713.    ChByte = Check("RESTSCREEN(",InStr)
  714.    If ChByte > 0
  715.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  716.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  717.    Endif
  718.    
  719.    ChByte = Check("SAVESCREEN(",InStr)
  720.    If ChByte > 0
  721.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  722.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  723.    Endif
  724.    
  725.    
  726.    ChByte = Check("SCROLL(",InStr)
  727.    If ChByte > 0
  728.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  729.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  730.    Endif
  731.    
  732.    
  733.    ChByte = Check("SETCANCEL(",InStr)
  734.    If ChByte > 0
  735.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  736.       InStr = "*:DB20? Function below not Available."+CRLF+InStr
  737.    Endif
  738.    
  739.    ChByte = Check("SETCOLOR(",InStr)
  740.    If ChByte > 0
  741.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  742.       InStr = "*:DB20? SETCOLOR() Not Valid. Use SET SAYVIDEO etc... "+CRLF+InStr
  743.    Endif
  744.    
  745.    ChByte = Check("ADIR(",InStr)
  746.    If ChByte > 0
  747.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  748.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  749.          "*:DB20? Use ADIR(ExpC [@Array1])"+CRLF+InStr
  750.    Endif
  751.    
  752.    
  753.    ChByte = Check("FWRITE(",InStr)
  754.    If ChByte > 0
  755.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  756.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  757.          "*:DB20? Use FWRITE(expN1, @varC, expN2)"+CRLF+InStr
  758.    Endif
  759.    
  760.    ChByte = Check("LEN(",InStr)
  761.    If ChByte > 0
  762.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  763.       InStr = "*:DB20? Function Syntax Change. LEN() Does not Support Arrays"+CRLF+;
  764.          "*:DB20? Use LEN(ExpC)"+CRLF+InStr
  765.    Endif
  766.    
  767.    ChByte = Check("MEMOEDIT(",InStr)
  768.    If ChByte > 0
  769.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  770.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  771.          "*:DB20? Use MEMOEDIT(expC [,expN1, expN2, expN3, expN4 [,expL1]])"+CRLF+InStr
  772.    Endif
  773.    
  774.    ChByte = Check("MEMOLINE(",InStr)
  775.    If ChByte > 0
  776.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  777.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  778.          "*:DB20? Use MEMOLINE(expC ,expN1, expN2)"+CRLF+InStr
  779.    Endif
  780.    
  781.    ChByte = Check("MEMORY(",InStr)
  782.    If ChByte > 0
  783.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  784.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  785.          "*:DB20? Use MEMORY() instead of MEMORY(<expN>)"+CRLF+InStr
  786.    Endif
  787.    
  788.    ChByte = Check("MLCOUNT(",InStr)
  789.    If ChByte > 0
  790.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  791.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  792.          "*:DB20? Use MLCOUNT(expC ,expN1)"+CRLF+InStr
  793.    Endif
  794.    
  795.    ChByte = Check("SELECT(",InStr)
  796.    If ChByte > 0
  797.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  798.       InStr = "*:DB20? Function Syntax Change."+CRLF+;
  799.          "*:DB20? Use SELECT([<expN>]) without an Alias name"+CRLF+InStr
  800.    Endif
  801.    
  802.    ChByte = Check("CURDIR(",InStr)
  803.    If ChByte > 0
  804.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting CURDIR() at byte "+Transform(chByte,"999")
  805.       InStr = STRTRAN(UPPER(inStr),"CURDIR(","CURRENTDIR(")
  806.    Endif
  807.    
  808.    ChByte = Check("ERRORLEVEL(",InStr)
  809.    If ChByte > 0
  810.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting ERRORLEVEL() at byte "+Transform(chByte,"999")
  811.       InStr = STRTRAN(UPPER(inStr),"ERRORLEVEL(","ERROR(")
  812.    Endif
  813.    
  814.    ChByte = Check("GETE(",InStr)
  815.    If ChByte > 0
  816.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Converting GETE() at byte "+Transform(chByte,"999")
  817.       InStr = STRTRAN(UPPER(inStr),"GETE(","GETENV(")
  818.    Endif
  819.    
  820.    
  821.    ChByte = Check("AADD(",InStr)
  822.    If ChByte > 0
  823.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  824.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  825.    Endif
  826.    
  827.    
  828.    ChByte = Check("ACLONE(",InStr)
  829.    If ChByte > 0
  830.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  831.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  832.    Endif
  833.    
  834.    ChByte = Check("AEVAL(",InStr)
  835.    If ChByte > 0
  836.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  837.       InStr = "*:DB20? Clipper 5.01 Code Blocks Not Supported Yet."+CRLF+InStr
  838.    Endif
  839.    
  840.    
  841.    ChByte = Check("ARRAY(",InStr)
  842.    If ChByte > 0
  843.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  844.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  845.    Endif
  846.    
  847.    ChByte = Check("ASIZE(",InStr)
  848.    If ChByte > 0
  849.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  850.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  851.    Endif
  852.    
  853.    
  854.    ChByte = Check("BROWSE(",InStr)
  855.    If ChByte > 0
  856.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  857.       InStr = "*:DB20? Use CREATE OBJECT BROWSE instead of BROWSE() Below."+CRLF+InStr
  858.    Endif
  859.    
  860.    ChByte = Check("DBCREATE(",InStr)
  861.    If ChByte > 0
  862.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  863.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  864.    Endif
  865.    
  866.    
  867.    ChByte = Check("DBEVAL(",InStr)
  868.    If ChByte > 0
  869.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  870.       InStr = "*:DB20? Clipper 5.01 Code Blocks not Supported Yet."+CRLF+InStr
  871.    Endif
  872.    
  873.    ChByte = Check("DBSTRUCT(",InStr)
  874.    If ChByte > 0
  875.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  876.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  877.    Endif
  878.    
  879.    ChByte = Check("DEVICEPOS(",InStr)
  880.    If ChByte > 0
  881.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  882.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  883.    Endif
  884.    
  885.    ChByte = Check("DIRECTORY(",InStr)
  886.    If ChByte > 0
  887.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  888.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  889.    Endif
  890.    
  891.    ChByte = Check("ERRORBLOCK(",InStr)
  892.    If ChByte > 0
  893.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  894.       InStr = "*:DB20? Clipper 5.01 Code Blocks not Supported Yet."+CRLF+InStr
  895.    Endif
  896.    
  897.    ChByte = Check("EVAL(",InStr)
  898.    If ChByte > 0
  899.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  900.       InStr = "*:DB20? Clipper 5.01 Code Blocks not Supported Yet."+CRLF+InStr
  901.    Endif
  902.    
  903.    ChByte = Check("FERASE(",InStr)
  904.    If ChByte > 0
  905.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  906.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  907.    Endif
  908.    
  909.    
  910.    ChByte = Check("FKLABEL(",InStr)
  911.    If ChByte > 0
  912.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  913.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  914.    Endif
  915.    
  916.    ChByte = Check("FKMAX(",InStr)
  917.    If ChByte > 0
  918.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  919.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  920.    Endif
  921.    
  922.    ChByte = Check("FRENAME(",InStr)
  923.    If ChByte > 0
  924.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  925.       InStr = "*:DB20? Use RENAME FILE instead of FRENAME()"+CRLF+InStr
  926.    Endif
  927.    
  928.    ChByte = Check("ISDIGIT(",InStr)
  929.    If ChByte > 0
  930.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  931.       InStr = "*:DB20? Clipper 5.01 Function below not Available."+CRLF+InStr
  932.    Endif
  933.    
  934.    ChByte = Check("MAXCOL(",InStr)
  935.    If ChByte > 0
  936.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  937.       InStr = "*:DB20? Function change MAXCOL() > BOTCOL()"+CRLF+STRTRAN(UPPER(InStr),"MAXCOL(","BOTCOL(")
  938.    Endif
  939.    
  940.    ChByte = Check("MAXROW(",InStr)
  941.    If ChByte > 0
  942.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  943.       InStr = "*:DB20? Function change MAXROW() > BOTROW()"+CRLF+STRTRAN(UPPER(InStr),"MAXROW(","BOTROW(")
  944.    Endif
  945.    
  946.    ChByte = Check("PAD(",InStr)
  947.    If ChByte > 0
  948.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  949.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  950.    Endif
  951.    
  952.    ChByte = Check("QOUT(",InStr)
  953.    If ChByte > 0
  954.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  955.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  956.    Endif
  957.    
  958.    ChByte = Check("READMODAL(",InStr)
  959.    If ChByte > 0
  960.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  961.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  962.    Endif
  963.    
  964.    ChByte = Check("SET(",InStr)
  965.    If ChByte > 0
  966.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  967.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  968.    Endif
  969.    
  970.    ChByte = Check("SETCURSOR(",InStr)
  971.    If ChByte > 0
  972.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  973.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  974.    Endif
  975.    
  976.    ChByte = Check("SETKEY(",InStr)
  977.    If ChByte > 0
  978.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  979.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  980.    Endif
  981.    
  982.    
  983.    ChByte = Check("SETPOS(",InStr)
  984.    If ChByte > 0
  985.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  986.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  987.    Endif
  988.    
  989.    ChByte = Check("VALTYPE(",InStr)
  990.    If ChByte > 0
  991.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  992.       InStr = "*:DB20? Clipper 5.01 Function not Supported"+CRLF+InStr
  993.    Endif
  994.    
  995.    Return(InStr)
  996.  
  997.  
  998.  
  999. *!*****************************************************************************
  1000. *!
  1001. *!       Function: CHECKCOMMANDS()
  1002. *!
  1003. *!      Called by: EXAMINE.PRG                       
  1004. *!
  1005. *!          Calls: CHECK()            (function  in EXAMINE.PRG)
  1006. *!
  1007. *!*****************************************************************************
  1008. FUNCTION CheckCommands
  1009.    Parameters InStr
  1010.    @ 9,26 say "Commands........"
  1011.    
  1012.    
  1013.    ChByte = Check("LOCAL",InStr)
  1014.    If ChByte > 0
  1015.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking LOCAL typing at byte "+Transform(chByte,"999")
  1016.       InStr = STRTRAN(inStr,SubStr(InStr,ChByte,Len("LOCAL")),"* LOCAL")
  1017.    Endif
  1018.    
  1019.    ChByte = Check("STATIC",InStr)
  1020.    If ChByte > 0
  1021.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking STATIC typing at byte "+Transform(chByte,"999")
  1022.       * Change due to 'bug'
  1023.       ntemp1 = SubStr(Instr,ChByte,6)
  1024.       ntemp2 = "*STATIC"
  1025.       InStr = STRTRAN(inStr, ntemp1, ntemp2 )
  1026.       release ntemp
  1027.    Endif
  1028.    
  1029.    ChByte = Check("SET MESSAGE TO",InStr)
  1030.    If ChByte > 0
  1031.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1032.       InStr = "*:DB20? Command Syntax Change."+CRLF+;
  1033.          "*:DB20? Use SET MESSAGE TO expC "+CRLF+InStr
  1034.    Endif
  1035.    
  1036.    ChByte = Check(" CALL ",InStr)
  1037.    If ChByte > 0
  1038.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1039.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1040.    Endif
  1041.    
  1042.    ChByte = Check("CLEAR TYPEAHEAD",InStr)
  1043.    If ChByte > 0
  1044.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1045.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1046.    Endif
  1047.    
  1048.    ChByte = Check("EXTERNAL ",InStr)
  1049.    If ChByte > 0
  1050.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1051.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1052.    Endif
  1053.    
  1054.    ChByte = Check("SET FUNCTION ",InStr)
  1055.    If ChByte > 0
  1056.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1057.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1058.    Endif
  1059.    
  1060.    ChByte = Check("SET KEY ",InStr)
  1061.    If ChByte > 0
  1062.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1063.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1064.    Endif
  1065.    
  1066.    ChByte = Check("SET SCOREBOARD ",InStr)
  1067.    If ChByte > 0
  1068.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1069.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1070.    Endif
  1071.    
  1072.    ChByte = Check("SET TYPEAHEAD ",InStr)
  1073.    If ChByte > 0
  1074.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1075.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1076.    Endif
  1077.    
  1078.    
  1079.    ChByte = Check("SET WRAP O",InStr)
  1080.    If ChByte > 0
  1081.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Programmer Comment at byte "+Transform(chByte,"999")
  1082.       InStr = "*:DB20? Command below not Available."+CRLF+InStr
  1083.    Endif
  1084.    
  1085.    
  1086.    Return(InStr)
  1087.  
  1088.  
  1089. *!*****************************************************************************
  1090. *!
  1091. *!       Function: MULTDECLARE()
  1092. *!
  1093. *!      Called by: EXAMINE.PRG                       
  1094. *!
  1095. *!          Calls: CHECK()            (function  in EXAMINE.PRG)
  1096. *!
  1097. *!*****************************************************************************
  1098. FUNCTION MultDeclare
  1099.    Parameters InStr
  1100.    @ 9,26 say "Declares........"
  1101.    
  1102.    ChByte = Check("DECLARE",InStr)
  1103.    If ChByte > 0
  1104.       
  1105.       CommaLoc = AT(",",InStr)
  1106.       If CommaLoc > 0
  1107.          NewDec = SubStr(InStr,1,CommaLoc-1)+CRLF
  1108.          LastPos = CommaLoc+1
  1109.          FOR CPos = CommaLoc+1 to Len(InStr)
  1110.             If SubStr(InStr,CPos,1) = ","
  1111.                NewDec = NewDec+"DECLARE "+SubStr(InStr,LastPos,CPos-LastPos)
  1112.                LastPos = CPos+1
  1113.             Endif
  1114.          NEXT
  1115.       ENDIF
  1116.    Endif
  1117.    Return(InStr)
  1118.  
  1119. *!*****************************************************************************
  1120. *!
  1121. *!       Function: CHECKINCLUDE()
  1122. *!
  1123. *!      Called by: EXAMINE.PRG                       
  1124. *!
  1125. *!          Calls: CHECK()            (function  in EXAMINE.PRG)
  1126. *!
  1127. *!*****************************************************************************
  1128. FUNCTION CheckInclude
  1129.    Parameters InStr
  1130.    @ 9,26 say "Includes........"
  1131.    
  1132.    ChByte = Check("#Include",InStr)
  1133.    If ChByte > 0
  1134.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #Include at byte "+Transform(chByte,"999")
  1135.       ProblemLine = .T.
  1136.    Endif
  1137.    
  1138.    ChByte = Check("#Ifdef",InStr)
  1139.    If ChByte > 0
  1140.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #Ifdef at byte "+Transform(chByte,"999")
  1141.       ProblemLine = .T.
  1142.    Endif
  1143.    
  1144.    ChByte = Check("#Ifndef",InStr)
  1145.    If ChByte > 0
  1146.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #Ifndef at byte "+Transform(chByte,"999")
  1147.       ProblemLine = .T.
  1148.    Endif
  1149.    
  1150.    ChByte = Check("#undef",InStr)
  1151.    If ChByte > 0
  1152.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #Undef at byte "+Transform(chByte,"999")
  1153.       ProblemLine = .T.
  1154.    Endif
  1155.    
  1156.    ChByte = Check("#Command",InStr)
  1157.    If ChByte > 0
  1158.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #Command at byte "+Transform(chByte,"999")
  1159.       ProblemLine = .T.
  1160.    Endif
  1161.    
  1162.    ChByte = Check("#Translate",InStr)
  1163.    If ChByte > 0
  1164.       Message=Message+CRLF+"Line "+Transform(nCurrentLine,"99999")+":  "++"Marking #Translate at byte "+Transform(chByte,"999")
  1165.       ProblemLine = .T.
  1166.    Endif
  1167.    Return(InStr)
  1168.  
  1169.  
  1170. Function About()
  1171. SET WINDOW TYPE TO 49
  1172. CREATE WINDOW "INTRO" AT 3,4 TO 24,75
  1173. SELECT WINDOW "INTRO" VIEW
  1174. SET WINDOW TITLE TO "About the Examiner"
  1175.  
  1176. set erase video to 144
  1177. ERASE
  1178. SET CURSOR TO WAIT
  1179.  
  1180. *: Declare PUBLICS and initialize memory variables
  1181. PUBLIC nTheMenu, nTheOption, nTheKey, sTheWindow, sTheButton
  1182.  
  1183. *: Place screen controls
  1184. CREATE CONTROL RECTANGLE "BX1" AT 1,8 SIZE 6,56 COLOR 154 WIDTH 1
  1185. SET Font 15 To "Arial",16,"BAV"
  1186. CREATE CONTROL TEXT "Intro1" AT 2,15 TEXT "CA-Clipper Source Code Examiner" COLOR 159 FONT 15
  1187. CREATE CONTROL TEXT "Intro2" AT 4,31 TEXT "Version 1.0" COLOR 159 FONT 0
  1188. CREATE CONTROL TEXT "Intro3" AT 5,26 TEXT "Written by Ed Chyzowski" COLOR 159 FONT 0
  1189.  
  1190. CREATE CONTROL TEXT "Intro4" AT 7,5 TEXT "This application is designed to read Clipper style source code" COLOR 156 FONT 0
  1191. CREATE CONTROL TEXT "Intro5" AT 8,7 TEXT "and make recommendations to the developer migrating the" COLOR 156 FONT 0
  1192. CREATE CONTROL TEXT "Intro6" AT 9,11 TEXT "source code into a CA-dBFast Environment." COLOR 156 FONT 0
  1193.  
  1194. SET Font 15 To "Arial",12,"BAV"
  1195. CREATE CONTROL TEXT "Intro7" AT 11,6 TEXT "This is not a CA-Clipper to CA-dBFast conversion program." COLOR 158 FONT 15
  1196.  
  1197. CREATE CONTROL TEXT "Intro8" AT 13,4 TEXT "This program is meant to be used as a tool to aid the developer" COLOR 157 FONT 0
  1198. CREATE CONTROL TEXT "Intro9" AT 14,13 TEXT "Migrate applications into CA-dBFast 2.0" COLOR 157 FONT 0
  1199. CREATE CONTROL TEXT "Intro10" AT 15,5 TEXT "This application is distributed with no warranty implied as to" COLOR 159 FONT 0
  1200. CREATE CONTROL TEXT "Intro11" AT 16,16 TEXT "its performance or integrity." COLOR 159 FONT 0
  1201.  
  1202. CREATE BUTTON "Continue" AT 18,19 SIZE 1,10
  1203. CREATE BUTTON "Exit" AT 18,35 SIZE 1,10 PLAIN
  1204.  
  1205. UPDATE CONTROL ALL
  1206. SET CURSOR TO ARROW
  1207. WAIT ""
  1208. CLOSE WINDOW 'INTRO'
  1209. If Button() = 'Exit'
  1210.    Return(.f.)
  1211.  else
  1212.    Return(.t.)
  1213. Endif
  1214. *: EOF: EXAMINE.PRG
  1215.