home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / tools / cvt / cvt324.doc next >
Text File  |  1988-01-24  |  20KB  |  425 lines

  1.      The reason for this program is to allow the modules for a 
  2. library to be developed/compiled for userlibs or .QLB's in a 1 or 
  3. more larger modules.  It also converts a program designed for QB3 
  4. to QB4 code.
  5.      When you create a .LIB file the LINKer access to that file 
  6. is in granule chunks.  This means that if you want to use a Basic 
  7. routine that compiled to 40 bytes of machine code and it is part 
  8. of a 10-K module; the linker loads 10-K of machine code.  The 
  9. remaining code may never be accessed but will be present in your 
  10. EXE file
  11.  
  12.      The program runs with a lot of instructions.  You shouldn't 
  13. have any problems figuring out what you need to do.  
  14.  
  15.      The initial goal for these progams was to automate the 
  16. creation of my LIBraries.  The Library is a commercial library 
  17. marketed as the dBASICs ToolKit.  It contains a large number of 
  18. SUBroutines.  The subroutines call other subroutines and FN's.  
  19. The FN's are contained in a header file along with a large common 
  20. block.  Original development broke about 90 routines down into 5 
  21. Basic files.  This was sufficient granulation of the library for 
  22. development under QB3 and would have remained so; until QB4 came 
  23. along.  When QB4 provided the enhanaced FUNCTION, it was possible 
  24. to do away with one of the weak points found in Basic; its 
  25. requirement to place a FN called by a SUB in the module being 
  26. compiled.  Now the library would be most efficient under QB4 when 
  27. each subroutine was a seperate module.  
  28.      Enter the dilema!  How do you maintain the two libraries?  
  29. Each calls for a substantial modification to optomize it for 
  30. different QB versions.  A maintenance nightmare loomed.  
  31. Maintenance now seemed to require total recall to avoid 
  32. introducing more problems with each simple maintenance act.  The 
  33. function/fn disparity could have been partialy overcome by 
  34. retaining the existing maintenance structure which used a special 
  35. file header for each module that using INCLUDE to provided the FN's 
  36. needed by the module; then the actual module.  A second set for 
  37. QB4 would replace the FN include with the DECLARES needed in the 
  38. module.  It would fail to provide the enhanced granularity that 
  39. was available under QB4.
  40.      The solution was to create a set of programs that would 
  41. process the original granules into a form that would be most 
  42. efficient with the appropriate version of QB.  The solution is 
  43. based on maintining the library in its original QB3 format of a 
  44. number of related modules that provided the optomal granulation 
  45. for QB3 and below.  The program would then process those granules 
  46. and create master compile modules and .FN modules for QB3 and 
  47. individual granules with the appropriate DECLARES included in 
  48. each SUB/FUN granule with QB4.
  49.  
  50.      CVT324 does the processing of a group of up to 20 BASIC 
  51. source files that, when combined, create a USERLIB or QUICKLIB 
  52. for either QB1-3 or QB4 and an appropriate .LIB file.  The LIB is 
  53. created with each of the SUB/FUNCTIONS included as a seperate 
  54. ranule.
  55.  
  56.  
  57. .cp8
  58.      You inform CVT324 of the following information:
  59.      o    Version of QB being used. (1-3 or 4+)
  60.      o    The name of up to 20 source modules used to create a 
  61.           library.
  62.      o    The '$include line that will provide common 
  63.           information.
  64.      o    If you want the display to be slowed to allow review of 
  65.           processing.
  66.      o    If you wish to name the output modules yourself or 
  67.           allow the program to name them.  If you use the 
  68.           automatic function, Sub/FUN names must be unique in the 
  69.           first 8 character in each name.
  70.  
  71.      The program then processes the modules to granules and 
  72. writes batch file information to speed up the subsequent 
  73. compile operation.  It can also write a control file that will 
  74. automate and speed-up subsequent reprocessing.  It can also write 
  75. a file containing all code modules for creating DECLARE 
  76. information and the environment library.
  77.      If Version 4 is selected, it changes each DEF FN found into 
  78. a FUNCTION and revises the FN's in all code written to remove FN 
  79. from the source.  The user can confuse this operation with odd 
  80. commenting and should review code to ascertain and correct for 
  81. any minor problems found.
  82.  
  83. Type
  84. ---------
  85.      Purpose
  86.      ------------------------------------------------------------
  87. [!].MGF
  88.      Maintains information about the modules that will be used to 
  89.      create a library.  Text may be edited to add/change.
  90. [G].SQ3 [G].SQ4
  91.      Creates   a  .SQ?  granule  for   each   Subroutine/Function 
  92.      contained  in  the  assigned  modules.   3/4  indicated   QB 
  93.      version selected.
  94. [G].FN
  95.      Creates the .FN granules needed by subsequent processing for 
  96.      QB3 compiles. (When QB selected is less than 4.)
  97. [G].FUN
  98.      Creates a .FUN granule for each FUNCTION or DEF FN(QB4 option) 
  99.      contained in the assigned modules.  These are used with QB4.
  100. [!].BAT
  101.      Creates a batch file using the master file name assigned 
  102.      that will automate the compiling of the library and 
  103.      USER/QUICK libraries.  This file can be created by either 
  104.      Gran? program.  The proper one to use is the one created by 
  105.      CVT324 when compiling QB4 and Gran3 when Compiling for QB3.
  106. [!].TXT
  107.      Creates the @file for LIB use.
  108. [!].QB3 .QB4
  109.      Creates a Basic source file that contains all of the 
  110.      assigned modules.  Used to compile the QUICK/USER LIB and 
  111.      get the DECLARES needed.
  112. [!].DCL
  113.  
  114.      Reads all the DECLARES found at the start of the .BAS file 
  115.      and writes the file used by Gran4.
  116. [M].QB3
  117.      Reads each module found in [!].MGF file; determines the FN's 
  118.      needed by the module; writes the modules from the .FN files 
  119.      create by CVT324 to .QB3; writes a $include for source module 
  120.      and $include for commons.
  121. [G].SUB  [G].FUN
  122.      Reprocesses all of the .SUB and .FUN files created by CVT324.  
  123.      It locates all CALLs or function assignment in the module; 
  124.      places the declares at the beginning of the file and 
  125.      rewrites the updated file.
  126.  
  127. [!] indicates Master name used to reference library modules
  128. [M] indicates the name of each module found in master list
  129. [G] indicates each subroutine/function found in the modules
  130.  
  131.  
  132. The reason for this program is to allow the modules for a library to be
  133. developed/compiled for userlibs or .QLB's in a 1 or more larger modules.
  134. When you create a .LIB file the LINKer access to that file is in granule
  135. chunks.  This means that if you want to use a Basic routine that compiled
  136. to 40 bytes of machine code and it is part of a 10-K module; the linker
  137. loads 10-K of machine code.  The remaining code may never be accessed but
  138. will be present in your EXE file
  139.  
  140. The program runs with a lot of instructions.  You shouldn't have any problems
  141. figuring out what you need to do.  
  142.  
  143.                               WARNINGS
  144. If you use the automatic naming, the program uses the first 8 
  145. characters in the routines name to name the output file and 
  146. appends .SUB or .FUN to create a DOSname.
  147.  
  148. If you have Fn?????() in the QB3 granules, you will have compiler 
  149. errors. This should not occur with QB4 because you can recreate 
  150. all FN's as FUNCTIONS which can be compiled as granules of their 
  151. own.  However w. QB4, you will have to place DECLARES in the 
  152. files created before compiling.  This can be done with the 
  153. include option to reference all SUBROUTINES being created in a 
  154. header.
  155.  
  156. If you scatter REMarks that include things like 'read to exit 
  157. sub, the utility will have problems.  You should be able to see 
  158. these problems by the lack of or improper color changes or the 
  159. list created.
  160.  
  161. REMEMBER, it is possible in REMarked areas to confuse the utility!
  162.  
  163. Work from backups or be certain that the files being generated 
  164. will not overwrite valid, existing files.
  165.  
  166. The program is NOT case sensitive.
  167.  
  168.                                 *****
  169.  
  170.  
  171. This is a shareware product.  The product has been slightly 
  172. crippled in the following manner:
  173.   o  forced 1 second pause when displaying each output line
  174.   o  Displaying of text while processing cannot be disabled
  175.   o  Partial documentation is provided.
  176. Otherwise, the shareware version works exactly like the commercial one.
  177.  
  178. For the Commercial version, send $25.00 to:  
  179.     Ken Prevo
  180.     Digital Design Consultants
  181.     15303 Colfax St.
  182.     Lowell, IN 46356
  183.     (219) 696-6760
  184.  
  185. QB4 Source Code is available for an additional $25.00
  186.  
  187.                          Commercial Ver. Speed
  188.    On a system where all files already reside in disk cache, 
  189. files written to memory disk, system 10-mhz 80286: Lines 
  190. processed just under 60 lines/second.  Writing to hard disk drops 
  191. speed to about 35 lines/sec.  And without cache, (Vanilla I/O) 
  192. its around 28 l/s.  These speeds are with source code display 
  193. turned off.  With source code display turned on, it typically 
  194. take 3-6 times as long to process the file. With all file output 
  195. turned off processing exceeded 80 l/s.
  196.  
  197. ASSUMPTIONS (Best Coding Method)
  198. It is assumed that you probably have a common block.  This block 
  199. should be developed as an $INCLUDE file.  You will need to have 
  200. it included with each granule created.  This is provided for by 
  201. allowing you to add a line of code to the start of each module.  
  202. You should also include all of the declares needed by ALL modules 
  203. to this file.  MS states that the referencing of the uncalled 
  204. modules will in no way effect the size of the .EXE file created.
  205.  
  206. Users of QB4 will load the combined code produced using QB.EXE to 
  207. create the DECLARE file that is needed by this program.  The 
  208. declares are inserted in the granules (Only where needed) to 
  209. allow referencing of different granules in the granule being 
  210. processed.  MS states that referencing a routine with a declare 
  211. statement that is not needed in the module/program does not force 
  212. the linker to load the granule referenced.  It is therefore 
  213. possible to develop one Declare include file that references all 
  214. modules; even the modules that are not needed in your coding.
  215.  
  216. Comments that contain [space] then FN SUB or FUNCTION followed by 
  217. a [space] will be lost in processing. You should surround these 
  218. instances with single quotes to avoid such a problem.
  219.  
  220. If you have comments that include the actual name of a subroutine 
  221. not in the module, the DECLARE associated with that subroutine 
  222. are also included in a module, it is best to single quote such 
  223. references to avoid this happening.
  224.  
  225.  
  226. This program should properly handle all common coding methods.  
  227. If the program errors in processing, I would appreciate a sample 
  228. of the code that does this.
  229.  
  230. This can be upload via compuserve, my id is 73167,1701.  It can 
  231. also be sent to the LANS BBS (219) 884-9508.  LANS BBS can also 
  232. receive messages forwarded from a number of other PCBoard BBS's.  
  233. Address msg. to Ken Prevo. 
  234.  
  235.                        *** ADVERTISMENT ***
  236.  
  237. This utility was written to support the following library that is 
  238. Sold By Digital Design Consultants:
  239.  
  240.               dBASICs ToolKit for BASIC Programmers
  241.  
  242.      The first release of the dBASICs ToolKit supports Quick
  243. Basic and the  Btrieve file manager.  Future release are planned
  244. that will provide support for XENIX5 Basic Compiler with Btrieve,
  245. and Fortran/Pascal/Masm/C with Btrieve in DOS and XENIX.
  246.  
  247.      The dBASICs ToolKit gives Basic many of the features found
  248. in 4th generation language.  dBASICs supports relational data
  249. structures.  Programs can be developed in a fraction of time
  250. utilizing the integrated dBasics environment.
  251.  
  252.      Program development begins with the designing of data
  253. structures using Webster--the data dictionary program.  Webster
  254. provides all of the standard Basic variables and adds:
  255.      - Money Variable (no more Basic rounding errors)
  256.      - Julian Date Variable
  257.      - Time Variable
  258.      - Phone Variable
  259.      - ZIP code variable
  260.      - NAD NameAndaDdress variable
  261.      - Upper Case String
  262.      - Social Security Number variable
  263.      - User defined data variables
  264.  
  265.      After developing the data file structures, screens are
  266. developed using ScreenStar, the screen design program.
  267. ScreenStar is a full screen editor with the following features:
  268.      - line and box drawing
  269.      - access graphic character
  270.      - access to character prohibited by Basic
  271.      - painting of blocks
  272.      - centering text
  273.      - column lock
  274.      - 32-color sets that define Input/Display colors
  275.      - line insert/delete to and from buffers
  276.      - screen text input from files
  277.      - screen access of up 10 data dictionaries (files)
  278.      - position/display fields for i/o
  279.      - move blocks
  280.      - print screen to printer or file
  281.  
  282.      - store screen in Binary file for fast screen loading
  283.  
  284.     After creating the screen and data dictionary files, special
  285. files are generated that control all screen and file handling
  286. inside the application.  The library provided, allows a program-
  287. mer to open a screen definition file that uses up to 10 data
  288. files at any one time.  You can append a record to a file with
  289. just 3 lines of program code.
  290.  
  291.      This powerful development system allows a programmer to
  292. develop programs in a fraction of the time often needed by other
  293. programming environments, such as dBASEIII, RBASE, Informix, or
  294. Focus.  In fact, if you assume a standard user interface, (same
  295. command character to add, append a record etc.) the same program
  296. can handle any single file with a custom screen without recom-
  297. piling. A sample program, that does just that, follows:
  298. '$Include:'dBASIC.INC'
  299.   'dBASICs functions/Header file
  300. Call ReadSDF((Command$)
  301.   'open file from command line--
  302.   'read and displays screen data
  303. f% = 1 'file #1 is being used
  304. While -1 'loop forever
  305.   Call EditChoice(2,24,1,x$)
  306.   Select Case x$
  307.    Case "A" 'add
  308. 'here are the 3 lines of code needed to a record, mentioned earlier
  309.      DD.Work$(f%) = String$(DD.Len(f%),0) 'clear the workspace
  310.      Call EditAll(f%) 'edit every editable field
  311.      Call DD.Append(f%) 'add the record created
  312.    Case "F" 'find
  313.      Call ParseKey(f%) 'input key to search for
  314.      Call DD.Find(1,"=") 'locate record
  315.      Call ShowAll(f%)   'and display it
  316.    Case "E" 'edit current
  317.      Call EditAll(f%) 'edit rec.
  318.      If GlobalCommand$ <> "^Q" Then Call DD.Update(f%) 'rewrite if no abort
  319.    Case "P" 'previous record
  320.      Call DD.Prev(f%) 'step back -- eof handled internally
  321.      Call ShowAll(f%) 'and display it
  322.    Case "N" 'next record
  323.      Call DD.Next(f%) 'step ahead -- eof handled by lib.
  324.      Call ShowAll(f%) 'and display it
  325.    Case "X" 'exit to DOS
  326.      Call AllDone("") 'close and exit without reporting error to error file
  327.    Case "D" 'delete current record
  328.      Call DD.Delete(f%) 'delete record and reposition file
  329.    Case Else 'report error
  330.      Call ShowPrompt("Bad Input")
  331.      Call Bell 'should soft alarm (Not terminal dependent)
  332.   End Select
  333. Wend
  334.  
  335.     Yes, this short program will edit; update; search; append to
  336. any file created using dBASICs's screen and data dictionary
  337.  
  338. creation programs.
  339.      The routines provided in the library perform elegant data
  340. entry of all data types.  Fields can be edited ala WordStar com-
  341. mands.  Numeric fields are input from the left ala a calculator.
  342. Special variable types have formats/picture capability.  eg.
  343. Phone: (999)999-9999, input positions for this picture are at the
  344. number positions only; () and - are skipped during entry and are
  345. not stored to the file for a saving of file space.  In fact, the
  346. phone number is stored as a double precision value. (8-bytes file
  347. storage)  Dates are stored in two-byte Julian date format.
  348. Julian date allow aged accounting reports, etc. to be easily
  349. programmed.
  350.      Because the basis for the dBASICs ToolKit is the Basic
  351. language, the programming environment does not impose the
  352. limitations found in many commercial database programs.
  353. Limitations such as no arrays, only flat file management, based
  354. on earlier DOS versions, new programming language with an extend
  355. learning curve, and limited to the number of fields or open
  356. files; is a thing of the past.
  357.      Included in the library are over 100 routines (many of which
  358. are called by other subroutines; and therefore need not be
  359. learned) that maintain files and avoid programmer use of
  360. Btrieve's primitive call.  There is single call editing of: a
  361. single field; a group of fields; or all fields.  The library is
  362. very powerful, easy to use, and provides the ability to
  363. manipulate fields and files based on the utility programs that
  364. are part of the toolbox.
  365.      A function file is included that will support the new
  366. variable types; eliminate Basic's notorious rounding error;
  367. support the library routines.
  368.  
  369.      The toolbox contains other support utilities that
  370. automatically create ISAM/Btrieve files from data dictionary file
  371. information; combine screens for direct memory loading of multi-
  372. page screen to color/EGA monitors; and dBASICs even writes the
  373. preliminary documentation for a screen.
  374.  
  375.      The programming environment created by the dBASICs ToolKit
  376. eliminates the need for many of Basic's commands.  Files are
  377. automatically opened as required.  Basic FIELDing statements are
  378. not needed.  The old 10 as x$,15 as y$ ad infinitum are now a
  379. thing of the past.
  380.  
  381.      User support is provided and the best available.  Support is
  382. free! -- no additional charges are made.  Also, a bulletin board,
  383. free to dBASICs licensees, is planned.  The bulletin board will
  384. provide users with free dBASICs updates; a forum to discuss
  385. problems and solutions; a library of programs that use the
  386. dBASICs ToolKit; public domain and shareware software featuring
  387. Basic and programmer related utilities.
  388.  
  389.      dBASICs' design philosophy was to avoid creating programmer
  390. barriers.  As an example, the program default number of fields is
  391. 512.  This is more than adequate for almost any application.  The
  392. design allows the user to edit the created files to have up to
  393.  
  394. 999 fields, if sufficient memory if available.  Up to 10 data
  395. files may be opened.  Again, more files may be opened by the
  396. programmer up to the constraints imposed by software or hardware.
  397.  
  398.      Evaluation software with demo programs that makes use of the
  399. dBASICs ToolKit is available upon written request on media
  400. letterhead or by phone.  Tear sheets of any articles or reviews
  401. are requested.
  402.  
  403.                  Pricing: (QB3/Btrieve Version)
  404.                   Single Copy           $495.00
  405.                  Site License          $1500.00
  406.                  Corporate License     $5000.00
  407.  
  408.      Free upgrades are provided via modem to all licensed users.
  409. No added charges for compiled applications containing dBASICs
  410. routines.
  411.  
  412. Dealer/Distributor inquiries invited:
  413.  
  414.                 For further information contact:
  415.                             Ken Prevo
  416.                    Digital Design Consultants
  417.                           15303 Colfax
  418.                         Lowell, IN 46356
  419.                          (219) 696-6760
  420.  
  421.             -----------------------------------------
  422.          Quick Basic is the trademark of Microsoft, Inc.
  423.            Btrieve is the TradeMark of SoftCraft, Inc.
  424.             XENIX is the TradeMark of MicroSoft, Inc.
  425.