Home
P 4 - a2
Contents
1. 10 Ctrl J 11 Ctrl K 12 Ctrl L 13 Return 14 Ctrl N 15 Ctrl 16 Ctrl P 17 Ctrl Q 18 Ctrl R PgUp 19 Ctrl S Left arrow 20 21 Ctrl U 22 Ctrl V Ins 23 Ctrl W Ctrl End 24 Ctrl X Down arrow 25 26 Ctrl Z Ctrl Left arrow 286 Alt A 304 Alt B 302 Alt C 288 D 274 Alt E 289 Alt LF 290 Alt G 291 Alt H 279 292 Alt J 293 294 Alt L 306 Alt M 305 Alt N 280 Alt O 281 Alt P 272 Alt Q 2775 Alt R 287 Alt S 276 Alt T 278 Alt U 303 Alt V 273 Alt g LW 301 Alt X 277 Alt 300 Alt Z 376 Alt 277 Alt 2 378 Alt 3 379 Alt 4 380 Alt 5 381 Alt 6 382 Alt 7 383 Alt 8 384 Alt 9 385 Alt 0 28 FI Backslash zi F2 22 F3 3 F4 4 F5 5 F6 6 F7 7 F8 8 F9 9 10 40 Fil 41 F12 20 Ctrl F1 21 Ctrl F2 DI Ctrl F4 23 24 Ctrl F5 25 F6 1186 nInkeyCode value Key or key combination 26 Ctrl F7
2. Lines lt gt XX Line 1 XXXXXX Line 2 XXXXXX XX Line 3 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX Across 4 Modify label This function permits you to modify a label file Label form This function permits you to print labels with the data provided by the active alias one label each record The following data is required LABEL FILENAME the label filename the WHILE condition the label printing WHILE goes on as long as this condition remain True the FOR condition only the records FOR from the active alias that satisfy the con dition are used for the label print New report This function permits you to create a standard report form file FRM under the dBasellI standard The informations to create a FRM file are divided into tw
3. pressions and the result is not necessarily a numeric data type NIL may be used as constant for assignment or comparing purpose Add or Unary Positive Gr 3 MII 222 Fields database fields cannot contain NIL Multiply Divide The following table shows all operations available inside nB for the Modulus NIL data type Except for these operations attempting to operate on NES Exponentiate a NIL results in a runtime error Compare for equity Compare for equity lt gt Compare for inequity lt gt Compare for inequity lt Compare for less than lt Compare for less than gt Compare for less than or equal lt Compare for less than or equal gt Compare for greater than gt Compare for greater than gt Compare for greater than or equal gt Compare for greater than or equal In line assign In line assign ABS Compute absolute value EMPTY Test for NIL Convert to ASCII character equivalent VALTYPE Evaluates data type directly DESCEND Convert to complemented form Test for zero For the purpose of comparison NIL is the only value that is equal to Exponentiate with e as the base NIL other values are greater than NIL i Variables are created inside nB with MEMPUBLIC This function 0 Compute natural logarithm Compute maximum creates variables which w
4. 1202 5 0 2 1202 2 222 2 2 2 2 1203 2 1203 SETCOLORO rca ei Pt 1203 SETCURSORO 6 EE UNE 1203 SETREYO oer e ES Ven DI dex urnas 1203 SETMODE scere eer vere E ERR EXTRAER NER 1204 i c e eames ees 1204 doe i Hoes ees 1204 SOUNDEX inpet tore dd edo a UU 1204 o Rana e RS ds 1204 SORT eter yao 1204 STRO aan 1205 STRIRAN Q rsa ERES E pae ius 1205 STUPRO siriana 1205 SUBSTR 4 os ix RA UK ERES 1205 TIMB ve ey ER TR 1206 TONE 1206 1206 ei 1206 UPDATED csrl 1207 UPPER 1207 USEDO scolari ro 1207 MAT 1207 VALTYPBE csi 1207 YEAR aaa 1207 NIB ERU eet use E RAE MA 1208 ACCEPT indenni 1208 ACHOICE rss 1208 ACHOICEWINDOW 1208 ATEERTE BOX Sereno vate sat der ace ac 1209 AT BO 52252 E 1209 etd xm Hp Om cete nara 1210 BUTTON one een e e ai 1210 COLORARRAY 4 5 y 1210 COORDINATE eos sess RE a 1210 COPY FILEO INS 1211 DBAPP mus t
5. 23 Ctrl End Ctrl 31 Ctrl PgUp Ctrl 30 Ctrl PgDn Ctrl g 408 Up arrow 416 Alt Down arrow 411 Alt Left arrow 413 Alt Right arrow 407 Alt Home 415 Alt End 409 Alt PgUp 417 Alt KL PgDn 13 Enter Ctrl bLM 32 Space bar 27 Esc 10 Enter 379 Ctrl Print Screen 309 284 Alt Enter 387 Alt Equals 257 Alt Esc 422 Keypad Enter 399 Keypad Ctrl 5 405 Keypad Ctrl 406 Keypad Ctrl 398 Keypad Ctrl 400 Keypad Ctrl 5 Keypad 5 420 Keypad Alt 311 Keypad 330 Keypad 334 Keypad 22 Uns T Del Ctrl gBL 8 Backspace Ctrl KgHLH 9 Tab 271 Shift Tab 402 Ctrl ns 403 Ctrl Del 127 Backspace 404 Ctrl Tab 418 Alt Ins 419 Alt Del 270 Alt Backspace 421 Alt Tab 1 Ctrl A Home 2 Ctrl B Ctrl Right arrow 3 Ctrl C PgDn ScrollLock 4 Ctrl D Right arrow 5 Ctrl E Up arrow 6 Ctrl F End 7 Ctrl G Del 8 Ctrl H Backspace 9 Ctrl Tab 1185 nInkeyCode value Key or key combination
6. rat 1124 Bugs and known problems 2x 1124 An old but free xBase for Dos What is it nanoBase is a Dos program that works essentially as a dot command line xBase a menu driven xBase e a xBase program interpreter nanoBase 1997 is compiled in two versions a small one to be used with old computers x86 16 with 640 Kibyte RAM and a second one to be used with better computers at least 1286 or better with 2 Mibyte RAM The dot command line Figure u136 1 The dot line The dot command line is the first face of nanoBase the one that ap pears starting the program normally It recalls the dot line command of the old xBases Please note that nanoBase recognise only expressions that is no commands The menu Figure u136 2 The file menu f Pressing F 0 the nanoBase menu appears From this menu the operations are easier than writing all commands on a prompt line but it is always possible to come back to the dot line to do an operation not available from the menu The macro recording compiling and execution Figure 136 3 The macro menu Start Stop dine nanoBase is able to record some actions made with the menu and all what is correctly typed from the dot prompt This may be the begin for a little program called macro inside nanoBase that can be executed as it is ASCII or compiled into another format faster to execute Macros fo
7. GVFILEEXIST GcNameToTest cExtention gt Success is the file name taken from the current get cNameToTest 8 to test for existence cExtention is the normal extention of the file This function is to be used inside GETS for post validation the file name have to exist cNameToTest is returned with the same length as before to avoid troubles with current and future GETS GVFILEEXTENTIONO GVFILEEXTENTION cName cExt T the file name to be eventually corrected cName i with file extention cExt the file extention to use as default This function is to use inside GETS for pre post validation when the content of a field should contain a file name that should be corrected adding a default extention if not given from the user GVSUBSTO GVSUBST GcField cSubst T GcField the field to be replaced with cSubst Subst is the string to be used to replace the con tent of cField This function is to use inside GETS for pre post validation when the content of a field should be replaced with other data cField is returned with the same length as before to avoid troubles with current and future GETS HTFO HTF nlnitialRecord NIL is the record number where to start the Help Text File browse Default is the ac tual record pointer nInitialRecord This function browse a Help
8. SET TYPEAHEAD nKeyboardSise Set SET PATH Set _SET_TYPEAHEAD nKeyboardSise SET PATH TO xcPathspec cPathspecl 1274 SET UNIQUE ON OFF xlToggle 1275 UPDATE FROM SORT TO xcDatabase ON idFieldl A D 0 31 Je ck scope WHILE Condition idField2 A D FOR Condition dbSort cDatabase acFields bForCondition r bWhileCondition nNextRecords Record Rest STORE STORE value TO variable variable value SUM SUM 1 E 2 TO idVarl idVar2 WHILE IWhileCondition NEXT nNextRecords REST ALL FOR IForCondition 4 RECORD nRecord dbeval idVarl idVarl nExp1 E idVar2 idVar2 nExp2 bre lt gt lForCondition IWhileCondition nNextRecords nRecord IRest TOTAL ON TOTAL ON expKey FIELDS idField list TO xcDatabase scope lt gt lt gt WHILE Condition FOR Condition dbTotal cDatabase bWhileCondition lt gt 1NextRecords x bKey acFields x bForCondition Record IRest UNLOCK UNLOCK dbUnlock UNLOCK ALL dbUnlockAll 1276 Set _SET_UNIQUE ON OFF 1Toggl
9. 2 2 2 2 1188 0202 4 1188 1189 LOGO siii 1189 LOWER Li 1189 1189 LUPDATE Li 1189 MAX 1189 MAXCOL 2 0 1189 MAXROW 2 4 4 4 4 4 2 1190 MEMOEDIT 2 22 1190 MEMOLINE scorsi kora rn 1191 MEMOREAD 0 1191 2 1191 2 2 1192 MEMOWRIT 2 2 2 4 1192 1192 MINO Rien 1192 MLCOUNT 2 02 2 1193 0 2 2 1193 2 0 E 1193 MONTHO e tn EVA CURE 1193 MPOSTOLCO 2 2 2 2 1194 NETERR Li 1194 NETNAME 2 24 1194 NEXTKEY 221 1194 NOSNOW 1194 ORDBAGEXT 4 1195 ORDBAGNAME 1195 ORDCREATE 2 2 1195 5 24 1195 ORDBOR redo tua 1196 OR DRE YO 1196 ORDLIS
10. SET KEY nInkeyCode TO Set _SET_PRINTFILE SetKey nInkeyCode NIL SET PRINTER TO xeDevice ADDITIVE SET KEY nInkeyCode idProcedure Set _SET_PRINTFILE cDevice cFile lAdditive SetKey nInkeyCode p 1 v idProcedure p 1 v SET RELATION TO SET MARGIN TO dbclearrelation Set 0 SET RELATION expKey INTO xcAlias1 TO expKey2 INTO xcAlias2 SET MARGIN TO nPageOffset dbClearRel Set SET MARGIN nPageOffset dbSetRelation cAlias expKeyl expKeyl SET MESSAGE TO dbSetRelation cAlias2 2 expKeyl Set MESSAGE 0 SET RELATION TO INTO xcAliasl gt TO expKey2 INTO xcAlias2 ADDITIVE Set SET MCENTER F dbSetRelation cAlias expKeyl expKeyl SET MESSAGE TO nRow CENTER CENTRE dbSetRelation cAlias2 2 expKeyl Set SET MESSAGE nRow SET SCOREBOARD ON OFF xlToggle Set SET MCENTER lCenter Set SET SCOREBOARD ON OFF 1Toggle SET ORDER TO nIndex SET SOFTSEEK ON OFF xlToggle ordSetFocus Set SET SOFTSEEK ON ORE lToggle 99
11. 2 22 2 2 2 1 4 1171 DBRELATION 2 2 2 2 222 1171 2 2 4 1171 DBRLOCKLIST 1 1172 DBRSELECT iii 1172 4 4 1172 5 22 2 2 2 2 1172 DBSELECTAREA 1172 DBSETDRIVER 1 1 1172 DBSETFILTER 1173 DBSETINDEX 2 2 1173 DBSETORDER 2 2 1173 DBSETRELATION 2 1173 5 2 2 2 2 4 1174 DBSTRUCT 2 2 2 1174 DBUNLOCK 2 2 21 1 4 4 2 1174 2 1174 DBUSEAREA 1174 DBDELETE 2 1 1175 22 2 2 2 2 4 1 4 4 4 1175 DEVOUT 1175 2 1175 22 4 1176 DIRECTORY 2 4 2 1176 DISKSPACE 2 1 1 1176 1128 DISPBOX 2 22 2 2 2 1 1 4 1177 1177
12. This function check cName for the presence of an extention It it has one the extention is removed STRDRIVEO STRDRIVE cName cDrive the file name with or without path that cName A contains the drive letter This function tries to extract the drive letter information from cName 1233 STREXTENTIONO STRPATHO STREXTENTION cName cExtention the file name with or without path that cName contains an extention This function tries to extract the extention information from cName STRFILEO STRFILE cName cFileName the file name with or without path cName This function tries to extract the file name without path from cName STRFILEFINDO STRFILEFIND cName cPath cFileName Name the file name or pathname containing the file name to search inside the cPath list a list of paths separated with semicolon cPath just like Dos does where cFile should be searched If your file is to be found on different possible positions this func tion search the first place where the file is found and returns a valid pathname to that file STRGETLENO STRGETLEN xExpr cPicture nFieldLength xExpr cPicture a generic expression the picture string This function returns the length of field when
13. TEXTO TEXT cText NIL Shows the text contained into cText TGLINSERTO TGLINSERT gt NIL Toggle the global insert mode and the cursor shape 2 TIMEX2N HH 155 gt nTime nHH is the number of hours nMM is the number of minutes nSS is the number of seconds This function calculate the time number that is a number repre senting days and or portion of a day 1 is 1 day or 24 hours 0 5 is 12 hours and so on 2 2 nTime nHours is the time number that is a number resenting days and or portion of a day 1 is 1 day or 24 hours 0 5 is 12 hours and so on nTime This function returns the integer number of hours contained inside nTime TIMEN2MO TIMEN2M nTime gt nMinutes is the time number that is a number rep resenting days and or portion of a day 1 is 1 day or 24 hours 0 5 is 12 hours and so on nTime This function returns the integer number of minutes contained inside nTime after subtracting the hours 1236 This function is equivalent to SETKEY but it returns always T WAITFILEEVALO WAITFILEEVAL Close gt Shows a wait bar calling WAITPROGRESS for operation on records of a database If there is no index active it is equivalent to WAITPRO GRES RECNO LASTREC
14. 1242 1243 Set 8 ON OFF IToggle Set 37 lCenter SET FILTER TO SET ORDER TO nIndex dbclearfilter ordSetFocus nIndex SET FILTER TO Condition SET PATH TO dbsetfilter bCondition cCondition Set 6 SET FIXED ON OFF xlToggle SET PATH TO xePathspec cPathspecl Set 2 ON OFF IToggle Set 6 cPathspec cPathspecl SET INDEX xeIndex xcIndexI1 SET PRINTER ON OFF xlToggle ordListClear ordListAdd cIndex ordListAdd cIndexl Set 23 ON OFF lToggle SET PRINTER TO SET INTENSITY ON OFF xlToggle Set 24 Set 31 ON OFF lToggle SET PRINTER TO xeDevice xcFile ADDITIVE SET KEY nInkeyCode TO Set 24 cDevice lAdditive SetKey nInkeyCode NIL SET RELATION TO SET KEY nInkeyCode idProcedure dbclearrelation SetKey nInkeyCode p 1 v idProcedure 1 v SET MARGIN TO SET RELATION TO 1 INTO xcAlias1 20 expKey2 INTO xcAlias2 ADDITIVE Set 25 0 SET MARGIN TO nPageOffset if lAdditive dbClearRel end dbSetRelation cAlias expKeyl expKeyl dbSetRelation
15. Left Bottom Right acCol acColSayPic 7 acColTopSep acColBodySep acColBotSep 5 acColHead acColFoot alColCalc abColValid 7 abColMsg cColor 7 abColColors 7 nFreeze Modify 1 Delete IButtons aButtons gt NIL nTop nLeft nBottom nRight defines the screen area where browse have to take place acCol acColSayPic is the columns array to be included into the browse is the picture array is the top separation array default is chr 194 chr 196 is the body separation array default is chr 179 is the bottom separation array default is chr 193 chr 196 is the header array for every column is the footer array for every column is the array that identify the calculated col umn not editable True means calculated is the validation array that specify when a field is properly filled The condition must be specified in code block format is the message array that permits to show information at the bottom of browse area The array must be composed with code blocks which result with a character string is the color string it may be longer than the usual 5 elements is the color code block array The code block receive as parameter the value con tained inside the field and must return an array containing two numbers they corre spond to the two color couple from cColor
16. cString cString cString 1 String delimiters Code blocks A code block is a sequence of function assignments and constant like the following sqrt 10 nResult 10 nIndex Suppose that the above sequence of operations has a meaning for you We want to create a box containing this sequence of operation This box is contained inside a variable bBlackBox sqrt 10 nResult 10 nIndex Note the comma used as separator Now bBlackBox contains the small sequence seen before To exe cute this sequence the function EVAL is used EVAL bBlackBox The execution of the code block gives a result the value of the last operation contained inside the code block In this case it is the result of 10 nIndex For that reason if the execution of the code block must give a fixed result it can terminate with a constant A code block may receive parameters working like a function Try to imagine that we need to do the following return nVar nVar2 function multiply nVarl nVar2 endfunction A code block that does the same is bMultiply nVarl nVar2 nVarl nVar2 To evaluate it for example trying to multiply 10 5 nResult EVAL bMultiply 10 5 and nResult will contain 50 Standard functions With nB all Clipper standard functions may be used Here follows a short description AADDO Array add AADD aT
17. cSayPicture TRANSFORM converts exp to a formatted character string as de fined by cSayPicture TYPEO TYPE cExp cType is a character expression whose type is to be determined cExp can be a field with or without the alias a private or public vari able or an expression of any type cExp returns one of the following characters Array Block Character Date Logical Memo Numeric Object NIL local or static Error syntactical Error indeterminate gt PIE is a system function that returns the type of the specified expression TYPE is like VALTYPE but uses the macro operator amp to determine the type of the argument VALTYPE by contrast evaluates an expression and determines the data type of the return value 1206 UPDATEDO UPDATED Change UPDATED returns true T if data in GET is added or changed otherwise it returns false F UPPERO UPPER cString gt cUpperString cString is the character string to convert UPPER returns a copy of cString with all alphabetical characters converted to uppercase All other characters remain the same as in the original string USEDO USED IDbfOpen USED returns true T if there is a database file in USE in the
18. send symbol 1261 Moreabout objects 1261 Step 4 understand the get object 1261 Step 5 trying to stop using commands 1262 MII uisus esee a 1263 PEE 1263 0 ani or 1263 iaia een 1263 Q TO cirie 1263 APPEND iper ai 1264 APPEND FROM e MEE EU PEE 1264 CLEAR sparare 1264 CLOSE pui S 1265 COMMIT XU ARR aa 1265 CONTINUE see Per iaia 1265 COPY aaa 1265 COUNT 1266 CREATE carrai 1266 DEFAULT rien 1266 DELETE ir 1267 EJECT farina pa 1267 ERASE id EER Aaa 1267 E 1267 1267 INDEX ili rinite 1267 JOIN rie ale 1268 KEYBOARD siii 1268 LABEL FORM i 1268 LIST ace oa e 1268 LOCATE tac 1268 EE 1268 ran 1268 READ a 1269 ipa ere 1269 REINDEX iii ai 1269 RELEASE cirillico 1269 RENAME cpr na 1270 REPLACE de 1270 REPORT FORM we 1270 RESTORE iii ai arti 1270 RESTORE FROM bed pee 1270 RUN Licio i mre APTE RAE OR EIS RUE ai Ae E 1270 SAVE SCREEN TO iss cess edet epi a 1270 SAVE ian este 1270 SEEK 1271 SBEBGT sorriso htm edt
19. If there is a get function like the above one screen I O may be per formed like the following example 2 22 exp list gout exp_list 22 exp_list qqout exp_list BOX nTop nLeft nBottom nRight BOX cnBoxString COLOR cColorString function do_some_editing add a new get object to the get objects array get aoGe 10 1 1 pcount gt 0 myVariable x myVariable gbt b n w n n eT return If the function GET is not liked the above I O may be done as it follows function e editing ne a variable to use as a get object local aoGet define a variable t an local aoGe as a get objects array lise it to 0 he empty array add a new get object to the get objects array GETENV 10 10 x iif pcount gt 0 myVariable x myVariable w n return Step 5 trying to stop using commands To stop using commands it is important to understand how com mands are or may be translated into functions Sometimes Clipper uses some undocumented functions these are functions that start with a underline 1262 dispbox nBottom nRight 1 enBoxString 5 cColorString GET 8 nTop GET Var PICTURE cGetPicture COLOR
20. NIL This function stuff a string into the keyboard buffer LISTWINDOWO LISTWINDOW acMenultem Description A Left Bottom Right cColorTop cColorBody gt nPosition is the character array containing the list of acMenultem choices 2 m is the header to be shown at the top win cDescription dow nTop nLeft nBottom are the window coordinates nRight is the color to use for window header and cColorTop footer is the color to use for the window body that cColorBody is space where the text appears This function is an similar to achoice but it shows a header and footer and it saves the screen acting like a window MEMOWINDOWO MEMOWINDOW cVar Description Top Left s Bottom Right 1 i cColorBody EditMode 5 nLineLength nTabSize cVar cVar is the character field variable to be edited cDescription is the header to be shown at the top win dow iam MER are the window coordinates cColorTop is the color to use for window header and footer cColorBody is the color to use for the window body that is the space where the text appears IEditMode is equivalent to memoedit nLineLength is equivalent to memoedit nTabSize is equivalent to memoedit 1221 This function let
21. SETPRC nRow nCol NIL nRow is the new PROW value nCol is the new PCOL value SETPRCY is a printer function that sends control codes to the printer without changing the tracking of the printhead position SOUNDEXO SOUNDEX cString gt cSoundexString cString is the character string to convert SOUNDEX returns a four digit character string in form A999 SPACEO SPACE nCount gt cSpaces is the number of spaces to return nCount SPACE returns a character string If nCount is zero SPACE returns a null string SQRTO SORT nNumber nRoot is a positive number to take the square root nNumber of SQRT returns a numeric value calculated to double precision The number of decimal places displayed is determined solely by SET DECIMALS regardless of SET FIXED A negative nNumber re turns zero 1204 STRO String STR nNumber nLength Decimals gt cNumber is the numeric expression to convert to a nNumber character string is the length of the character string to nLength return including decimal digits decimal point and sign nDecimals is the number of decimal places to return STRO returns nNumber formatted as a character string STRTRANO STRTRAN cString cSearch Replace Start n Count gt cNewStrin
22. lt gt REINDEX REINDEX EVAL EvalCondition EVERY Records ordCondSet bEvalCondition Records woo aa ordListRebuild RELEASE RELEASE idMemvar MXRelease idMemvar RELEASE ALL MRelease x t RELEASE ALL LIKE skeleton MRelease skeleton 5 RELEASE ALL EXCEPT skeleton MRelease skeleton 1269 RENAME SAVE TO RENAME xcOldFile TO xcNewFile SAVE TO xcMemFile ALL LIKE EXCEPT skeleton frename cOldFile cNewFile _MSave cMemFileName Skeleton REPLACE REPLACE idFieldl WITH 1 idField2 WITH exp2 e FOR IForCondition WHILE IWhileCondition NEXT nNextRecords e 79 RECORD nRecord REST ALL dbeval idFieldl expl idField2 exp2 gt lt lForCondition IWhileCondition nNextRecords gt nRecord IRest REPLACE idFieldl WITH expl idFieldl expl REPORT FORM REPORT FORM xcReport PRINTER To FILE xcFile NOCONSOLE scope gt gt WHILE Condition FOR ICondition PLAIN HEADING cHeading NOEJECT gt gt SUMMARY ReportForm cForm IToPrinter E cToFile INoConsole 5 bForCondition re bW
23. or all spaces RTRIM returns a null string SAVESCREENO SAVESCREEN Top nLeft Bottom 7 Right gt cScreen nTop nLeft nBottom define the coordinates of the screen region nRight to save Default is the entire screen 1201 SAVESCREEN returns the specified screen region as a character string SCROLLO SCROLL Left A Bottom n Right 2 Vert 2Horiz gt NIL nTop nLeft nBottom nRight define the scroll region coordinates defines the number of rows to scroll verti cally A positive value scrolls up the spec ified number of rows A negative value scrolls down the specified number of rows A value of zero disables vertical scrolling If nVert is not specified zero is assumed defines the number of rows to scroll hor izontally A positive value scrolls left the specified number of columns A negative value scrolls right the specified number of columns A value of zero disables hori zontal scrolling If nHoriz is not speci fied zero is assumed If you supply neither nVert or nHoriz parameters to SCROLL the area specified by the first four parame ters will be blanked nVert nHoriz SCROLL is a screen function that scrolls a screen region up or down a specified number of rows When a screen scrolls up the first line of the region is erased all other lines are moved up and a blank line is displayed
24. ISoftSeek SELECT SET DEFAULT TO xcPathspec SELECT xnWorkArea idAlias Set 7 cPathspec dbSelectArea nWorkArea cIdAlias SET DELETED ON OFF xlToggle SET SET ALTERNATE TO xcFile ADDITIVE Set 11 ON OFF Toggle Set 19 cFile lAdditive SET DELIMITERS ON OFF xlToggle SET ALTERNATE ON OFF xlToggle Set 33 ON OFF IToggle Set 18 ON OFF IToggle SET DELIMITERS TO DEFAULT SET BELL ON OFF xlToggle Set 34 Set 26 ON OFF IToggle SET DELIMITERS TO cDelimiters SET COLOR COLOUR TO cColorString Set 34 cDelimiters SetColor cColorString SET DEVICE TO SCREEN PRINTER SET CONFIRM ON OFF xlToggle Set 20 SCREEN PRINTER Set 27 ON OFF IToggle SET EPOCH TO nYear SET CONSOLE ON OFF xlToggle Set 5 nYear Set 17 ON OFF IToggle SET ESCAPE ON OFF xlToggle SET CURSOR ON OFF xlToggle Set 28 ON OFF IToggle SetCursor 1 0 iif 1 0 SET EXACT ON OFF SET DATE FORMAT TO cDateFormat Set 1 ON OFF Toggle Set 4 cDateFormat SET EXCLUSIVE ON OFF xlToggle
25. S 1177 vse iii 1177 ve or pue e e ora bes 1177 EMPIY A EDS LA EN 1178 Eolo 1178 1178 EXPO 1178 1178 vex ees 1179 FCREATE 20 2 1179 FERASE 2 4 1179 FERROR Li 1179 2 2 2 2 24 12 4 1180 FIELDGET 21 0 02 1180 2 1180 FIELDPOS 2 2 2 2 0 1180 0 0 2 1180 FIELDWBLOCK 1180 MNT dn 1181 PLOCK O 1181 uri 1181 FOUNDO Lie 1181 PRPA DO a 1181 PREADSTRO ui 1182 4 4 1182 ion 1182 FWRITEQ si 1183 GETENVO lio 1183 HARDCR Li 1183 HEADER 2 2 2 2 2 21 4 1183 PENE el 1183 ela lille 1184 INDEXEXT 1184 INDEXKEY siii 1184 INDEXORD 2 12 22 1184 INKEYO suora 1184 E A 1187 ISALPHA 2 1187 ISCOLOR 2 2 2 2 1 1187 ISDIGITO iii 1187 ISEOWER een otov ii 1188 ISPRINTER 1188 ISUPPER Li iii 1188 L2BINQ Li 1188 LASTKEY 2 2 1188 8 0
26. cAlias JOIN JOIN WITH TO xcDatabase FOR Condition FIELDS idField list dbJoin cAlias cDatabase acFields 4 bForCondition KEYBOARD KEYBOARD c tring Keyboard String gt NIL LABEL FORM LABEL FORM xcLabel TO PRINTER TO FILE xcFile NOCONSOLE scope WHILE Condition FOR ICondition SAMPLE dbLabelForm cLabel ToPrinter cFile gt INoConsole bForCondition bWhileCondition nNextRecords Record Rest Sample LIST LIST exp list TO PRINTER TO FILE xcFile scope WHILE Condition FOR Condition OFF dbList 1 ToDisplay abListColumns bForCondition bWhileCondition gt nNextRecords Record Rest IToPrinter cFileName LOCATE LOCATE scope FOR Condition WHILE Condition dbLocate bForCondition bWhileCondition nNextRecords Record Rest PACK PACK 1249 dbPack PUBLIC PUBLIC idMemvar MemPublic cMemvarName acMemvarNames QUIT QUIT Quit RELEASE RELEASE idMemvar MemRelease cMemvarName acMemvarNames REPORT FORM REPORT FORM xcReport TO PRINTER TO FILE xcFile NOCONSOLE scope WHILE Condition FOR Condition PLAIN HEADING cHeading NOEJECT SUMMARY RF
27. Array TAIL ATAIL aArray gt Element aArray is the array ATAIL is an array function that returns the highest numbered el ement of an array It can be used in applications as shorthand for aArray LEN aArray when you need to obtain the last element of an array BIN21O Binary to integer BIN2I cSignedInt nNumber is a character string in the form of a 16 bit signed integer number least significant byte first cSignedInt BIN2I returns an integer obtained converting the first two byte con tained inside cSignedInt BIN2LO Binary to long BIN2L cSignedInt nNumber is a character string in the form of a 32 bit signed integer number least significant byte first cSignedInt BIN2L returns an integer obtained from the first tour characters contained in cSignedInt 1166 BIN2WO Binary to word BIN2W cUnsignedInt gt nNumber is a character string in the form of a 16 bit unsigned integer number least significant byte first cUnsignedInt BIN2W returns an integer obtained from the first two characters contained in cSignedInt BOFO Begin of file BOF gt Boundary returns true T after an attempt to SKIP backward be yond the first logical record in a database file otherwise it returns false F If there is no database file op
28. FOR VIA xcDriver __ cFileName acFields bForCondition bWhileCondition n NextRecords T gt nRecord Rest eDriver APPEND FROM xcFile FIELDS idField_list scope WHILE Condition FOR ICondition e DELIMITED xcDelimiter dbDelim f cFileName cDelimiter acFields bForCondition gt SE bWhileCondition nNextRecords Record APPEND FROM xcFile FIELDS idField list scope WHILE Condition e FOR SDF SetPos 0 0 CLOSE CLOSE dbCloseArea CLOSE idAlias idAlias gt doCloseArea CLOSE ALTERNATE Set 19 CLOSE DATABASES dbCloseAll CLOSE INDEXES dbClearIndex SetPos 0 0 ReadKill T GetList CLEAR GETS 1264 COMMIT GbSDF f cFileName acFields bForCondition 5 bWhileCondition COMMIT gt nNextRecords Rest CLEAR dbCommitAll CONTINUE CLEAR CONTINUE Scroll dbContinue COPY COPY FILE xcSourceFile TO xcTargetFile xeDevice CopyFile cSourceFile cTargetFile Device COPY STRUCTURE FIELDS idField_list TO xcDatabase 1265
29. TYPE LENGTH DECIMAL Field Types 1141 it is a text field long LENGTH charac ters it is a numeric field long LENGTH characters with DECIMAL characters for decimal positions Note that if LENGTH is 4 and DECIMAL is 0 zero the field may contain integers N Numeric from 999 to 9999 but if LENGTH is 4 and DECIMAL 1 the field may con tain numbers from 9 9 to 99 9 two po sition for the integer part one position for the decimal point and one position for decimal it is a date field it contains only dates D Date the length should not be specified as it is automatically 8 itisalogical boolean field it contains only TRUE represented by Y or T L Logic or FALSE represented by N or F The length should not be specified as it is automatically 1 itis a character field with unknown di mension It is recorded into a parallel file with DBT extention The original M Memo DBE file holds a space for a pointer inside the DBT file The length of a Memo field is automatically 10 and is referred to the memo pointer After the function NEW DBF is selected a table for the field specifications appears C Character To navigate and to edit the table use the following keys move the cursor one position up Up Down Left Rightdwn left or right PgUp move to previous screen page PgD
30. array DISKSPACEO DISKSPACE nDrive nBytes is the number of the drive to query where one is drive A two is B three is C etc The default is the current DOS drive if nDrive is omitted or specified as zero nDrive DISKSPACE returns the number of bytes of empty space on the specified disk drive as an integer numeric value 1176 DISPBOXO Display box DISPBOX nBottom nRight cnBoxString 7 eColorString gt NIL nTop nLeft nBottom nRight define the coordinates of the box is a numeric or character expression that defines the border characters of the box If specified as a numeric expression a value of 1 displays a single line box and a value of 2 displays a double line box other numeric values display a single line box If cnBoxString is a character expression it specifies the characters to be used in draw ing the box This is a string of eight border characters and a fill character defines the display color of the box that is drawn cnBoxString cColorString DISPBOX is a screen function that draws a box at the specified display coordinates in the specified color DISPOUTO Display out DISPOUT exp cColorString gt NIL exp is the value to display is an optional argument that defines the dis play color of exp is a character expression containing the standard color s
31. lt gt lt RECORD nRecord REST ALL ui rest aj dbeval idVar idVar 1 lForCondition lWhileCondition _ Scroll nNextRecords nRecord IRest 1238 1239 DEFAULT DEFAULT xVar TO xDefaultValue DEFAULT xVar xDefaultValue gt xVar DELETE DELETE dbDelete NEXT nNextRecords lt gt 79 RECORD nRecord REST ALL DELETE FOR WHILE IWhileCondition dbeval dbDelete ForCondition nNextRecords nRecord IRest lWhileCondition lt gt DELETE FILE ferase cFile EJECT EJECT qgout chr 13 ERASE ERASE xcFile ferase cFile FIND FIND xeSearchString dbSeek cSearchString GO O TO Record dbgoto nRecord O TO BOTTOM dbGoBottom TOP dbgotop INDEX ON INDEX ON expKey TO xcIndexName UNIQUE ASCENDING DESCENDING FOR lt gt WHILE IWhileCondition EVAL lEvalCondition EVERY nRecords 1240 ordCondSet cForCondition bForCondition pii b WhileCondition Le bEvalCondition gt RECNO ordCreate cIndexName cExpKey bExpKey READ READ ReadM
32. p ctr tr tr d Pup pa agt sa 7 nanoBase s doc mentation si translated also inside the HTF format NB HLP Pressing normally a contextual piece of the manual appears Some standard functions have its own internal help contained inside the EXE file This was made to help programming with nanoBase Download it Here is the 1997 edition of nanoBase EXE for small computers ftp ftp simtel net pub simtelnet msdos database nbase7a1 zip http www google com search q nbase7a1 zip EXE for i286 with more than 2 Mibyte ftp ftp simtel net pub simtelnet msdos database nbase7a2 zip http www google com search q nbase7a2 zip Runtime for small computers ftp ftp simtel net pub simtelnet msdos database nbase7a3 zip http www google com search q nbase7a3 zip Documentation in many different formats ftp ftp simtel net pub simtelnet msdos database nbase7a4 zip http www google com search q nbase7a4 zip Macro programming examples ftp ftp simtel net pub simtelnet msdos database nbase7a5 zip http www google com search q nbase7a5 zip Source for version 96 06 16 without mouse support 1996 ftp ftp simtel net pub simtelnet msdos database nbase7a6 zip http www google com search q nbase7a6 zip Source for version 1997 ftp ftp simtel net pub simtelnet msdos database nbase7a7 zip http www google com search q nbase7a7 zip Bugs an
33. 1 1221 ISCONSOLEON 2 2 2 4 1221 ISPRINTERON 4 4 1221 KEYBOARD 2 4 1221 LISTWINDOW 4 4 1 1221 MEMOWINDOW 2 4 1221 MEMPUBLIC 24 4 4 1222 MEMRELEASE 1222 MEMRESTORE 1222 MEMSAVE spo 1222 MENUPROMPT 2 1222 1222 MESSAGELINE 4 2 1223 MOUSESCRSAVE 1223 MOUSESCRRESTORE 1223 PICCHRMAX 2 1223 QUITO ill no 1223 BEAD il a 1224 RO 1224 na 1224 1224 1225 1225 SV 1225 SETCOLORSTANDARD 1225 SETFUNCTION 21 1225 8 4 1225 2 1226 4 1226 SETRPTLINESQ 4 1227 2 1227 SETVERB EXACT obsolete 1227 SETVERB F
34. 399 405 406 398 400 420 311 330 334 22 27 402 403 127 404 418 419 270 421 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 286 304 302 288 274 289 290 291 279 292 293 Ctrl Up arrow Ctrl Down arrow Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il II Il Il Il II Il II Il Il Il Il Il Il II Il Il Il Il II Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il LI Ctrl Left arrow Ctrl Z Ctrl Right arrow Ctrl B Ctrl Home Ctrl synsqb Ctrl End Ctrl W Ctrl PgUp Ctrl Hyphen Ctrl PgDn Ctrl Alt Up arrow Alt Down arrow Alt Left arrow Alt Right arrow Alt Home Alt End Alt PgUp Alt PgDn Enter Ctrl M Return Ctrl M Space bar Esc Ctrl synsqb Ctrl Enter Ctrl Return Ctrl Return Compat Ctrl Print Screen Ctrl Alt Enter Alt Return Alt Equals Alt Esc Keypad Alt Enter Keypad Ctrl 5 Keypad Ctrl Keypad Ctrl Keypad Ctrl Keypad Ctrl Keypad Alt 5 Keypad Alt Keypad Alt Keypad Alt Keypad Alt Ins Ctrl V Del Ctrl G Backspace Ctrl H Tab Ctrl I Shift Tab Ctrl Ins Ctrl Del Ctrl Backspace Ctrl Tab Alt Ins Alt Del Alt Backspace Alt Tab Ctrl A Home Ctrl B Ctrl Right arrow Ctrl C PgDn
35. ALERTBOX cMessage aOptions gt nChoice is the message text displayed centered in the alert box If the message contains one or more semicolons the text after the semi colons is centered on succeeding lines in the dialog box defines a list of up to 4 possible responses to the dialog box cMessage aOptions ALERTBOX returns a numeric value indicating which option was chosen If the Esc key is pressed the value returned is zero The ALERTBOX function creates a simple modal dialog The user can respond by moving a highlight bar and pressing the Return or SpaceBar keys or by pressing the key corresponding to the first letter of the option If aOptions is not supplied a single Ok option is presented ALERTBOX is similar to ALERT but it accept mouse input ATBO ATB nTop Left Bottom Right gt aArray Subscript acColSayPic acColTopSep acColBodySep acColBotSep A acColHead acColFoot abColValid abColMsg cColor abColColors Modify IButtons aButtons gt NIL nTop nLeft nBottom defines the screen area where browse have nRight to take place aArray bidimensional array to be browsed nSubscript starting array position acColSayPic is the picture array is the top separation array default is acColTopSep chr 1 04 che f 96 i is the body separation array default
36. FCLOSE is a low level file function that closes binary files and forces the associated DOS buffers to be written to disk If the oper ation fails FCLOSEQ returns false F FERROR can then be used to determine the reason for the failure 1178 FCOUNTO Field count FCOUNT nFields FCOUNT returns the number of fields in the database file in the active alias as an integer numeric value If there is no database file open FCOUNT returns zero Field create FCREATE nAttribute nHandle is the name of the file to create If the cFile file already exists its length is truncated to zero without warning is the binary file attribute the default value is zero nAttribute 0 Normal default nAttribute Read only nAttribute 2 Hidden nAttribute 4 System nAttribute returns the DOS file handle number of the new binary file in the range of zero to 65 535 If an error occurs FCREATE returns 1 and FERROR is set to indicate an error code FERASEO File erase FERASE cFile nSuccess is the name with or without path of the file to be deleted from disk FERASE is a file function that deletes a specified file from disk FERASE returns 1 if the operation fails and zero if it succeeds FERRORO F
37. and DOC is available the Macro recorder menu When a macro recording is started a amp appears on the left side of the status bar It it blinks the recording is active if it is stable the recording is paused 1153 The macro recording is not exactly a step by step recording of all action taken but a translation as good as possible of what you have done The macro recorder is able to record only the menu functions that terminates with the amp symbol and all what is inserted at the dot command line The macro recording can be viewed and edited during the recording The macro recording can be saved into a text file a macro file Data types The data types supported in the nB macro language are the same as Clipper Array Character Code Block Numeric Date Logical Memo NIL Character The character data type identifies character strings of a fixed length The character set corresponds to CHR 32 through CHR 255 and the null character CHR 0 Valid character strings consist of zero or more characters with a the oretical maximum of 65535 characters The real maximum dimen sion depends on the available memory Character string constants are formed by enclosing a valid string of characters within a designed pair of delimiters There are three pos sible delimiter pairs two single quotes like string constant two double quotes like string constant left and right square brackets like
38. bject to the get objects array return NIL e aoGet is get objects array so here is explicitly passed This get objects array is modified grown and there is no need to return it as inside Clipper arrays are always passed by reference to functions nRow and nCol are the screen coordinates where the get field should appear at as it works with the GET command e bVar is a special code block that permits the editing of a vari able If the variable Var is to be edited the code block is 1 1 iif pcount gt 0 Var x Var e cGetPicture is the picture to use same as GET com mand e cColorString is the color string to use same as the GET command e bPreValid is a code block containing the condition that must be valid before the cursor can reach this get field It is equiv alent to the WHEN condition used with the GET command but it must be converted into a code block For example if the condition is A gt B the code block is A gt B e pPostValid is a code block containing the condition that must be valid before the cursor can leave this get field It is equiva lent to the VALID condition used with the GET command but it must be converted into a code block For example if the condition is A gt B the code block is A gt B
39. cForm bForCondition 5 WhileCondition nNext nRecord Rest cbHeading BeforeEject ISummary Wate acExtra gt NIL RESTORE FROM RESTORE FROM xcMemFile ADDITIVE MemRestore cMemFileName Additive RUN RUN Run SAVE TO SAVE TO xcMemFile ALL LIKE EXCEPT skeleton MemSave cMemFileName cSkeleton Like j SET FUNCTION SET FUNCTION nFunctionKey TO cString SetFunction nFunctionKey cString 1250 SORT SORT TO xcDatabase ON A D C idField2 C scope WHILE ICondition FOR ICondition dbSort cDatabase acFields bForCondition x b WhileCondition 5 nNextRecords Rest TOTAL TOTAL ON expKey FIELDS idField_list TO xeDatabase scope WHILE Condition FOR Condition dbTotal cDatabase bKey acFields bForCondition bWhileC ondition nNextRecords 5 nRecord 3 IRest UPDATE UPDATE FROM xcAlias ON expKey RANDOM REPLACE idFieldl WITH exp idField2 WITH exp dbUpdate cAlias bKey Random j bReplacement Example dbUpdate INVOICE LAST T FIELD gt TOTALI FIELD gt TOTAL2 INV gt 50 1 E SUM2 ZAP ZA
40. dbCopyStruct cDatabase acFields COPY STRUCTURE EXTENDED TO xcExtendedDatabase __dbCopyXStruct cExtendedDatabase 79 FOR VIA xcDriver COPY TO FIELDS idField_list scope WHILE Condition e i nNextRecords re i Rest eDriver dbCopy cFileName acFields bForCondition bWhileCondition FOR ICondition lt gt DELIMITED xcDelimiter COPY TO FIELDS idField_list scope WHILE Condition dbDelim t cFileName cDelimiter i acFields n bForCondition EP Sk bWhileCondition nNextRecords A Rest 1 FOR Condition SDF COPY TO FIELDS idField_list scope WHILE ICondition lt dbSDF t cFileName acFields bForCondition bWhileCondition i x3 nNextRecords nRecord Rest COUNT DELETE DELETE dbDelete NEXT nNextRecords RECORD nRecord REST ALL DELETE FOR WHILE IWhileCondition nNextRecords nRecord IRest dbeval dbDelete ForCondition IWhileCondition lt gt DELETE FILE xcFile ferase cFile EJECT EJECT qqout chr 13 ERASE ERASE xcFile ferase cFile
41. define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define K_CTRL_UP K_CTRL_DOWN K_CTRL_LEFT K_CTRL_RIGHT K_CTRL_HOME K_CTRL_END K_CTRL_PGUP K_CTRL_PGDN K_ALT_UP K ALT DOWN K ALT LEFT K ALT RIGHT K ALT HOME K ALT END K ALT PGUP K ALT PGDN K ENTER RETURN K SPACE ESC ENTER K_CTRL_RETURN K_CTRL_RET K_CTRL_PRTSCR K_CTRL_QUESTION K_ALT_ENTER K_ALT_RETURN K_ALT_EQUALS K_ALT_ESC KP_ALT_ENTER KP_CTRL_5 KP_CTRL_SLASH KP_CTRL_ASTERISK KP_CTRL_MINUS KP_CTRL_PLUS KP_ALT_5 KP_ALT_SLASH KP_ALT_ASTERISK KP_ALT_MINUS KP_ALT_PLUS K_INS K_DEL K_BS K_TAB K_SH_TAB K_CTRL_INS K_CTRL_DEL K_CTRL_BS K_CTRL_TAB K_ALT_INS K_ALT_DEL K_ALT_BS K_ALT_TAB K_CTRL_A K_CTRL_B K CTRL C K CTRL D K CTRL E K CTRL F K CTRL G K CTRL H K CTRL I K CTRL J K CTRL K K CTRL L K CTRL M K CTRL N K CTRL O K CTRL P K CTRL 0 K CTRL R K_CTRL_S K CTRL T K CTRL 0 K CTRL V K CTRL K CTRL X K CTRL Y K CTRL Z K ALT A K ALT B K ALT C K ALT D K ALT E K ALT F K ALT K ALT H K ALT I K ALT J K ALT K 397 401 26 29 23 31 30 408 416 411 413 407 415 409 417 13 13 32 21 10 10 10 379 309 284 284 387 257 422
42. nated from screen restoring the previous screen content MOUSESCRSAVEO MOUSESCRSAVE Top Right gt cSavedScreen nTop are the screen coordinates that will be to and nRight save the screen This function works line SAVESCREEN but it hide the mouse cur sor before a screen save is made MOUSESCRRESTOREO MOUSESCRRESTORE Left Bottom Right Screen cSavedScreen nTop nLeft nBottom are the screen coordinates where the saved and nRight screen will be restored cScreen is the previously saved screen to restore This function works line RESTSCREEN but it hide the mouse cur sor before a screen restore is made PICCHRMAXO PICCHRMAX Col cPictureString Col is the starting position on the screen for the get field nMaxCol 2 end position on the screen of the get This function is useful when a character field is to be used on a get object The generated picture will be the of the maximum possible extention eventually with scroll QUITO QUIT NIL Terminates program execution 1223 READO READ aoGet Pos aButtons gt Updated is the array of get objects nPos is the starting position is the array of buttons if True get f
43. 27 Ctrl F8 28 Ctrl F9 29 Ctrl 10 44 Ctrl F11 45 Ctrl F12 30 Alt F1 231 Alt F2 32 33 Alt F4 34 Alt F5 35 Alt 36 Alt KL F7 227 Alt F8 38 Alt F9 39 Alt F10 46 Alt F11 47 Alt F12 10 Shift 1 11 F2 12 Shift 213 Shift F4 14 Shift F5 15 Shift F6 16 Shift KK F7 17 Shift FS 18 Shift F9 19 Shift F10 42 Shift F 43 Shift F 2 INTO Integer INT nExp nlnteger is a numeric expression to convert to an in teger nExp is a numeric function that converts a numeric value to an in teger by truncating all digits to the right of the decimal point INT is useful in operations where the decimal portion of a number is not needed ISALPHAO ISALPHA cString gt Boolean cString is the character string to examine ISALPHA returns true T if the first character in cString is alphabetic otherwise it returns false ISCOLORO ISCOLOR ISCOLOUR Boolean ISCOLOR returns true T if there is a color graphics card in stalled otherwise it returns false F ISDIGITO ISDIGIT cString gt Boolean cString is the character string to examine ISDIGIT returns true T if the first char
44. 5 01 1991 CyberSoft ftp ftp simtel net pub simtelnet msdos clipper oclip zip Step 4 understand the get object What happens with a command like the following nTop nLeft GET Var A get object is created containing all the necessary information for editing the variable Var at the screen position After that this get object is added to a get objects array usually called GetList The get objects array will contain all the get objects used during a READ So what happens when a READ command is encountered The get objects array GetList is read and the editing of all get objects is executed After that the get objects array is cleared This method hides what Clipper really makes The suggestion here is to create function that will substitute the GET com mand and to use the READMODAL function to read the get objects array Here is an example of it function GET nRow nCol bVar cGetPicture cColorString bPreValid bPostValid local get object the get object using the function GETENV TENV nRow nCol bVar NIL cGetPicture cGetColor send to the get object the pre validation condition code block WHEN bPreValid preBlock send to get object the post validation condition code block VALID oGet postBlock bPostValid display the get on the screen using the display method oGet display
45. Ctrl ScrollLock Ctrl D Right arrow Ctrl E Up arrow Ctrl F End Ctrl G Del Ctrl H Backspace Ctrl I Tab Ctrl J Ctrl K Ctrl L Ctrl M Return Ctrl N Ctrl 0 Ctrl P 1 0 Ctrl R PgUp Ctrl S Left arrow Ctrl T Ctrl U Ctrl V Ins Ctrl W Ctrl End Ctrl X Down arrow Ctrl Y Ctrl Z Ctrl Left arrow Alt A Alt B Alt C Alt D Alt E Alt F Alt G Alt H Alt I Alt J Alt K 1278 1279 define K_ALT_L 294 define K_ALT_M 306 define K_ALT_N 305 define K ALT O 280 define ALT P 281 define K ALT 272 define K ALT R 215 define K ALT 5 287 define K ALT T 276 define K_ALT_U 278 define K_ALT_V 303 define K_ALT_W 273 define K ALT X 301 define K ALT Y 277 define K_ALT_Z 300 define K_ALT_1 376 define K_ALT_2 377 define K_ALT_3 378 define K_ALT_4 379 define K_ALT_5 380 define K_ALT_6 381 define K_ALT_7 382 define K_ALT_8 383 define K_ALT_9 384 define K_ALT_0 385 define K_F1 28 define K F2 1 define K_F3 2 define K F4 3 define F5 4 define K F6 5 define K F7 6 define F8 7 define K F9 8 define K_F10 9 define K_F11 40 define K_F12 41 define K_CTRL_F1 20 define K_CTRL_F2 21 define K_CTRL_F3 22 define K_CTRL_F4 23 define F5 24 define F6 25 define 26 define 27 define K_CTRL_F9 28 define K_CTRL_F10 29 define K_CTRL_F11 44 define K_CTRL_F12 45 define K
46. current work area otherwise it returns false F VALO Value VAL cNumber gt nNumber is the character expression to convert cNumber VAL is a character conversion function that converts a character string containing numeric digits to a numeric value When VAL is executed it evaluates cNumber until a second decimal point the first non numeric character or the end of the expression is encoun tered VALTYPEO Value type VALTYPE exp cType exp is an expression of any type VALTYPE returns a single character representing the data type re turned by exp VALTYPE returns one of the following characters A Array B Block Character D Date L Logical M Memo N Numeric Object U NIL VALTYPE is a system function that takes a single argument eval uates it and returns a one character string describing the data type of the return value YEARO YEAR dDate nYear dDate is the date value to convert returns the year of the specified date value including the century digits as a four digit numeric value The value returned is 1207 not affected by the current DATE or CENTURY format Specifying a null date CTOD returns zero nB functions Some functions made into nB are available for macro use Not all available functions are here docu
47. define MEMOEDIT_UNKEY define MEMOEDIT_UNKEYX define MEMOEDIT_INIT User function return codes define MEMOEDIT_DEFAULT define MEMOEDIT_IGNORE define MEMOEDIT_DATA define MEMOEDIT_TOGGLEWRAP define MEMOEDIT_TOGGLESCROLL define MEMOEDIT_WORDRIGHT define MEMOEDIT_BOTTOMRIGHT 0 32 33 34 35 100 101 idle all keys processed unknown key memo unaltered unknown key memo altered initialization mode perform default action ignore unknown key treat unknown key as data toggle word wrap mode toggle scrolling mode perform word right operation perform bottom right operation SET 1280 define SET EXACT define SET FIXED 2 define SET DECIMALS 3 4 SET DATEFORMAT 4 define SET EPOCH 5 define SET PATH 6 define SET DEFAULT 7 define SET EXCLUSIVE 8 define SET SOFTSEEK 9 define SET UNIQUE 10 define SET DELETED 11 define _SET_CANCEL 12 define _SET_DEBUG 13 define _SET_TYPEAHEAD 14 define _SET_COLOR 15 define _SET_CURSOR 16 define SET CONSOLE 17 define SET ALTERNATE 18 define SET ALTFILE 19 define SET DEVICE 20 define SET EXTRA 21 define SET EXTRAFILE 22 define SET PRINTER 23 define SET PRINTFILE 24 define SET 25 define SET BELL 26 define SET CONFIRM 27 define SET ESCAPE 28 define SET INSERT 29 define SET EXIT 30 define SET INTENSITY 31 define SET SCOREBOAR
48. predefinita dbview b articoli dbf nvio Mostra le tuple utilizzando una sola riga per ognuna dbview b articoli dbf recode ibm437 latinl nvio Come nell esempio precedente ma utilizza recode per tra sformare i caratteri speciali che altrimenti non sarebbero visibili correttamente per esempio le lettere accentate DBF2pg Il programma dbf2pg consente di leggere il contenuto di un file DBF e di inserire i dati relativi in una relazione di una base di dati di PostgreSQL dbf2pg opzioni file dbf In base alle opzioni che vengono indicate i dati possono essere ag giunti a una relazione esistente oppure possono sostituire le tuple di tale relazione oppure si pu creare una relazione da zero Quello che conta che i permessi fissati attraverso PostgreSQL consentano l accesso e le operazioni che si intendono svolgere dbf2pg non in grado di trasferire gli attributi memo quelli che tradizionalmente venivano creati utilizzando file con estensione DBT Tabella u135 4 Alcune opzioni Opzione Descrizione v Permette di avere informazioni sulle ope razioni svolte ottenendo un dettaglio CEN maggiore nel secondo caso Permette di specificare il nodo a cui accedere per connettersi con il serven h nodo te di PostgreSQL In mancanza di que sta indicazione viene tentato l accesso a localhost Permette di specificare il nome dell
49. used for printing There is also another way to print with the RPT system that is available inside the nB internal editor 1145 DBGOTOP Moves the record pointer for the active alias at the first logical record New label With this function can be created a standard label file LBL under the dBasellI standard Labels may be printed in more than one column and can contain 16 lines maximum The label data is the following REMARK a label remark that will not be printed HEIGHT the label vertical dimension WIDTH the label horizontal dimension MARGIN the left margin in characters LINES the vertical spacing between labels SPACES the horizontal spacing between labels in characters ACROSS the number of label columns LINE 1 The first line inside labels LINE n The n th line inside labels LINE 16 The 16th line inside labels The number of lines inside the labels depend on the HEIGHT and the maximum value is 16 The label lines can contain constant string and or string expres sions See the example below Margin lt gt XXXXXXXX Height XXXX lt Width gt XXXXXXXXXXXXXXXX
50. utile nel caso in cui i nomi originali siano incompatibili con PostgreSQL Opzione t relazione nome_vecchio nome_nuovo Le opzioni s e permettono di defi nire l intervallo di righe da trasferire do ve nel primo caso si indica la riga iniziale e nel secondo quella finale Se non si in dicano il trasferimento parte dall inizio e prosegue fino alla fine s n riga iniziale e n riga finale Segue la descrizione di alcuni esempi 5 dbf2pg d Anagrafe c t Indirizzi address dbf Invio Crea la relazione Indirizzi nella base di dati Anagrafe disponibile presso l elaboratore locale prelevando i dati dal file address dbf 5 dbf2pg h localhost d Anagrafe t Indirizzi address dbf nvio Esattamente come nell esempio precedente con l indicazione precisa del nodo locale Dbview GNU GPL 2 DBF2pg software libero con licenza speciale 1119 1120 Copyright Daniele Giacomini appunti2 gmail com http informaticalibera net 2 2013 11 11 nanoBase 1997 ca iii ia 1121 The dot command ine iii al 1121 The Tell e ae 1121 The macro recording compiling and execution 1122 The Teport SYStEM cine 1125 Theant erated text editor ies al 1123 The internal documentation 1124 Download it
51. 1235 acColTopSep acColBodySep acColBotSep acColHead acColFoot alColCalc abColValid abColMsg cColor abColColors nFreeze indicates the number of columns to be left frozen on the left side IModify indicates whether the browse can modify data IDelet indicates whether the browse can delete EHE and recall records IButtons if True default buttons are displayed aButtons array of buttons aButtons n 1 N the nth button row position aButtons n 2 N the nth button column position aButtons n 3 the nth button text aButtons n 4 B the button code block This function called without parameters starts the browse of the active alias and if relations are established the browse includes also related data 250 25 nTime nSeconds is the time number that is a number rep resenting days and or portion of a day 1 is 1 day or 24 hours 0 5 is 12 hours and so on nTime This function returns the number of seconds with eventual deci mals contained inside nTime after subtracting the hours and the minutes TRUESETKEYO TRUESETLEY nInkeyCode bAction T Please note that due to an unresolved problem the field names contained inside acCol should better contain also the alias ALIAS FIELD See also the examples
52. ALT Fl 30 define K ALT F2 31 define K ALT F3 32 define K ALT F4 33 define K ALT F5 34 define K ALT F6 35 define ALT F7 36 define K ALT F8 37 define K_ALT_F9 38 define K_ALT_F10 39 define K_ALT_F11 46 define K_ALT_F12 47 define K SH Fl 10 define SH F2 11 define K SH F3 12 define SH F4 13 define SH F5 14 define SH F6 15 define K SH F7 16 define SH 17 define K SH F9 18 define SH F10 19 define K_SH_F11 42 define K_SH_F12 43 Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il II Il Il 1 II Il Il II 77 Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il Il 71 Il Alt L Alt M Alt N Alt 0 Alt P Alt Q Alt R Alt S Alt T Alt U Alt V Alt W Alt X Alt Y Alt Z Alt 1 Alt 2 Alt 3 Alt 4 Alt 5 Alt 6 Alt 7 Alt 8 Alt 9 Alt 0 F1 Ctrl Backslash F2 F3 FA F5 F6 F7 F8 F9 F10 F11 F12 Ctrl F1 Ctrl F2 Ctrl F4 Ctrl F3 Ctrl F5 Ctrl F6 Ctrl F7 Ctrl F8 Ctrl F9 Ctrl F10 Ctrl F11 Ctrl F12 Alt Fl Alt F2 Alt F3 Alt F4 Alt F5 Alt F6 Alt F7 Alt F8 Alt F9 Alt F10 Alt F11 Alt F12 Shift Fl Shift F2 Shift F3 Shift F4 Shift F5 Shift F6 Shift F7 Shift F8 Shift F9 Shift F10 Shift Fll Shift F12 User function entry modes define MEMOEDIT_IDLE
53. It is typically used to log error messages in a manner that will not interfere with the standard screen or printer output OUTSTDO Output standard OUTSTD exp list NIL 1197 is a list of values to display and can consist of any combination of data types including memo exp_list OUTSTD is a simple output function similar to QOUT except that it writes to the STDOUT device instead of to the console output stream PAD PADL exp nLength cFillChar cPaddedString PADC exp nLength cFillChar cPaddedString PADR exp nLength cFillChar cPaddedString ei is a character numeric or date value to pad p with a fill character 2 is the length of the character string to re nLength turn _ is the character to pad exp with If not cFillChar 3 specified the default is a space character PADC PADL and PADR are character functions that pad char acter date and numeric values with a fill character to create a new character string of a specified length PADC centers exp within nLength adding fill characters to the left and right sides PADL adds fill characters on the left side and PADR adds fill characters on the right side Printed column PCOL nColumn PCOL returns an integer numeric value representing the last printed column position plus one The beginning co
54. It will be printed on every page at the absolute fourth page line CODE INSERTION Pieces of code can be inserted inside COMMAND It can be useful to make complicated reports The following example declares a public variable used to number pages 001 command 002 mempublic PageNo 003 PageNo 0 004 end 005 lpp 66 006 head 007 command 008 PageNo PageNo 41 009 010 011 012 013 foot 014 015 Page PageNo 016 017 wend 018 left 10 019 text text text 020 test text text At line 001 starts a COMMAND definition lines 002 and 003 will be interpreted from the function EX the nB interpreter These lines define a public variable and initialize it at 0 This variable will be use to count pages At line 007 inside the header nested start another COM MAND definition that contains an increment for the PageNo variable As the header is read and executed for every new page and that before the footer the variable PageNo will con tain the right page number At line 015 inside the footer a reference to PageNo appears Here will be printed the page number A more complicated example be found in ADDRESS TXT the RPT text file used for the ADDRESS amp macro examples How can l nB is a little bit complicated as it may do many things Here are some examples Create a UDF function UDF means User Defined Function Inside nB
55. Only the records contained in dit 2 orcondinon side the active alias that respect the condi tion will be taken into consideration a code block containing the WHILE condi bWhileCondition tion to respect The first time that the con dition is False the sort terminates if used means that only the first nNextRecord nNextRecords inside the active alias will be used nRecord if used means that that only the record nRecord will be used __ IRest if used means that only the remaining records inside the active alias will be used Copy the active alias to a DBF file in sorted order DBTOTALO DBTOTAL cDatabase bKey acFields 5ForCondition bWhileCondition nNextRecords A Record Rest gt NIL the DBF file to create that will contain the copy of summarised records the code block key expression that should bKey correspond to the key expression of the ac tive index of the active alias the array of fields to be used to create the new cDatabase file a code block containing the FOR condition to respect Only the records contained in side the active alias that respect the condi tion will be taken into consideration a code block containing the WHILE condi tion to respect The first time that the con dition is False the sort terminates if used means that only the first nNextRecords inside the active alias will be used if used means tha
56. PROCEDURE _ _1 statements RETURN statements ENDPROCEDURE PROCEDURE procedure name 2 statements RETURN statements ENDPROCEDURE DO PROCEDURE procedure_name_n Macro without procedures statements statements statements statements statements nB Macros may be compiled with Clipper To do so the first struc ture example must be changed as follows INCLUDE MACRO CH DO PROCEDURE procedure_name_nth PROCEDURE procedure_name_1 statements RETURN statements ENDPROCEDURE PROCEDURE procedure_name_2 statements RETURN statements ENDPROCEDURE To compile a macro with Clipper the macro file name can be changed into MACRO PRG and RTLINK MACRO RMK Enter should be started Macro comments nB Macro source file can contain comments only the com ment is recognised This way and will generate errors ATTENTION to simplify the macro interpretation lines such as this qqout You can t do that you can t do that will generate an error as the interpreter will read only qqout You can t do that Sorry Macro long lines split mn Inside a nB macro long lines may be splitted using semicolon Please note that lines can only be splitted and not joined a resulting command line cannot be longer then 254 characters The macro recorder Inside the functions ASSIST
57. Text File that must be already opened and be the active alias ISFILEO ISFILE cName IFileExists is the file name with or without path to be cName checked for existence This function returns true T if the file cName exists The dif ference between this function and the standard FILE function is that ISFILE checks for wildcards before If cName contains wild cards the result is false F ISWILDO ISWILD lIsWild is the file name with or without path to be Name checked for wildcards presence This function returns true T if cName contains wildcards 1220 ISMEMVAR lIsMemvar cName is the name of a possible memvar This function returns true T if the cName is a declared Mem var ISCONSOLEONO ISCONSOLEON ConsolelsOn This function returns true T if the console will show the result of ISPRINTERONO ISPRINTERON gt This function returns true T if the default printer will report the the result QOUT and QQOUT The default printer is PRN or LPT1 If SET ALTERNATE TO is configured to send outputs to LPT2 or another printer the function will report false F KEYBOARDO KEYBOARD cString
58. UNIQUE obsolete SETVERB UNIQUE Unique gt IPrevious If Unique is True during creation or update of DBF indexes if two or more records are found with the same key only the first record will be included inside the index If Unique is False duplicated record keys are allowed The starting value is False SETVERBCDELETED SETVERB DELETED Deleted IPrevious If Deleted is True record signed for deletion are not filtered that is these are still normally visible as they were not deleted In the other case they hare in most cases hidden to the user The starting value is False SETVERBC CANCEL SETVERB CANCEL Cancel IPrevious If Cancel is True enables and Ctrl Break as termination keys In the other case not The starting value is True SETVERBCTYPEAHEAD SETVERB TYPEAHEAD nPrevious nTypeAhead is the number of keystrokes the keyboard buffer can hold from a minimum of zero to a maximum of 4096 The starting value is 15 SETVERBCCOLOR SETVERB COLOR eColorString cPrevious nColorString defines the normal screen colors There are five cou ple of colors but only three are really operative 1229 This is the standard color used for screen standard output This is the color used for highlighted
59. a DBE file containing addresses in various ways a little bit more complicated than 2ADDRESS amp 3ADDRESS compiled macro 3ADDRESS amp AADDRESS amp a macro program source example for han dling a DBF file containing addresses in various ways a little bit more complicated than 3ADDRESS amp AADDRESS NB compiled macro 4ADDRESS amp ABIORITM amp a macro program source example for cal culating the personal bio wave ABIORITM NB compiled macro ABIORITM amp STUDENT DBF a DBE file used inside BSTUDENT macro example STUDENT NTX index file used for _STUDENT DBF STUDSTD DBF a DBE file used inside the BSTUDENT macro example STUDENT RPT a RPT text file used to print data contained inside STUDENT DBF STUDSTD RPT a RPT text file used to print data contained inside STUDSTD DBF BSTUDENT amp a macro program source example for stu dents evaluation a description about stu dents is obtained linking other standard de scriptions BSTUDENT NB compiled macro BSTUDENT amp 6 a macro program source example to gen erate a batch file to be used to back up an entire hard disk CBATMAKE compiled macro CBATMAKE amp a macro program source
60. active output configuration SETRPTEJECTO SETRPTEJECT IPreviousEjectMode This function is used to set the eject mode after every page print for If single sheet paper is used then SETRPTEJECT T must be set for continuous paper SETRPTEJECT F is correct The default value is F 1226 logical or code block is the eject mode to IbEject set Default is no change the starting value is F SETRPTLINESO SETRPTLINES nRemainingLines This function is used to report the number of lines available before the completion of the page print for RPT SETVERBO Set verbose SETVERB cSpecifier xNewSetting gt xPreviousValueSet a word that defines the kind of set is going Speci to be considered xNewSetting is the new value to set up lOpenMode used only for some kind of set This function is analogue to SET but it uses a character string with cSpecifier and not a number to select the set This is made to make easier the work with macros cSpecifier may contain EXACT FIXED DECIMALS DATEFORMAT EPOCH PATH DEFAULT EXCLUSIVE SOFTSEEK UNIQUE DELETED CANCEL TYPEAHEAD COLOR CURSOR CONSOLE ALTERNATE ALTFILE DEVICE EXTRA EXTRAFILE PRINTER PRINTFILE MARGIN BELL CONFIRM ESCAPE INSERT EXIT INTENSITY SCOREBOA
61. alias that should be taken into nNextRecords nRecord Res gt NIL consideration default is all a code block containing the FOR condition a code block containing the FOR condition b diti to respect Only the records contained in bForCondition to respect The operation will be made for ForCondition side the active alias that respect the condi all records that respect the condition tion will be taken into consideration S pode Diode Containing We Wh Coi bWhileCondition dition to respect The first time it becomes False operation is terminated 1214 NextR d if used means that only the first nNextRecords will be appended copied R d if used means that that only the record nRecord will be appended copied if used means that only the remaining IReset records will be taken into consideration This function is used to append data to the active alias using data from the cFileName file or to copy data into cFileName using the active alias as the source cFileName is a SDF ASCII file DBSORTO DBSORT cDatabase acFields BForCondition bWhileCondition nNextRecords NIL cDatabase the DBF file to create acFields the array of fields to be used to create the new sorted cDatabase file code block containing the FOR condition Li to respect
62. an expression of any valid data type is the position of the first element to fill If this argument is omitted the default value is one is the number of elements to fill starting with element nStart If this argument is omitted elements are filled from the start ing element position to the end of the array expValue nStart nCount AFILL is an array function that fills the specified array with a sin gle value of any data type including an array code block or NIL by assigning expValue to each array element in the specified range AINSO Array insert spaces removed ARRAYO ARRAY nElements nElements gt aArray is the number of elements in the specified nElements dimension ARRAY is an array function that returns an uninitialized array with the specified number of elements and dimensions 5 ASCII ASC cExp nCode is the character expression to convert to a number cExp AINS aTarget nPosition aTarget is the array into which a new element will aTarget be inserted is the position at which the new element nPosition will be inserted AINS is an array function that inserts a new element into a speci fied array The newly inserted element is NIL data type until a new value is assigned to it After the insertion the last element in the array is discard
63. an expression that will be solved and dis nTop and nLeft nLeft played cSayPicture is the picture to use to display Expr cColorString is the color string to use This function displays the result of Expr on the screen on the desired position SETCOLORSTANDARDO SETCOLORSTANDARD nColor Color acColor gt cPreviousColor acPreviousColor is the color number to take into considera tion 0 All colors 1 Base 2 Menu 3 Head 4 Body Say Get 5 Button Mouse buttons 6 Message 7 Alert the color string to be associated with nColor it the color array nColor cColor acColor This function is a way to handle colors inside the application The functions that display something use a default color depending on what they does These colors may be changed with SETCOLOR STANDARD all together or only one SETFUNCTIONO SETFUNCTION nFunctionKey cString gt NIL the number of the function key 12 F12 to be assigned the character string nFunctionKey cString This function assigns a character string to a function key obsolete 1225 SETMOUSEO SETMOUSE IShow IPrevious Irue shows the mouse cursor False hide the mouse cursor NIL reports only the sta tus IShow This function is made to show hide or report only the mouse cursor status SETOU
64. be used to scroll inside the history list without showing the all list with 22 Enter is used to tell nB to execute the written function As the dot line is not an easy way to use such a program a menu is available pressing F 0 or Alt M The F10 key starts the ASSIST menu This menu may be started also entering the name of the function ASSIST nB includes a simple built in text editor DOC It may be started from the dot line entering DOT No special key is dedicated to start this function The menu system The nB menu system appears differently depending on the place where it is called When available the menu system appears press ing Alt M 210 1140 One Two Three Four Five The cursor may be moved on a different position using arrow keys Left V Right Esc terminates the menu Enter opens a vertical menu The vertical menu contains selectable items organised vertically One Two Three Four Five First Second Third The cursor be moved on a different position using arrow keys Up Down the arrow keys Right change the vertical menu Esc closes the vertical the menu Enter starts the selected menu function The vertical menu contains selectable items organised vertically Two Three Four Five First Second gt i Third 1500 function 1 The cursor may be moved on a different position
65. cColorString lt gt lt WHEN IPreExpression VALID IPostExpression setpos nTop nLeft aadd GetList GET Var Var cGetPicture IPostExpression ne This is the command substitution made automatically but it shouldn t be used to make clean programs The step 4 u0 1 sug gests to create a get function SAY nTop nLeft SAY exp COLOR cColorString devpos nTop devout exp cColorString nTop nLeft SAY exp PICTURE cSayPicture COLOR cColorString devpos devoutpic exp cSayPicture cColorString Q TO nTop nLeft TO nBottom nRight DOUBLE COLOR cColorString dispbox nBottom nRight 2 eColorString nTop nLeft TO nBottom nRight COLOR cColorString 1263 IPreExpression display atail GetList colorDisp ColorSt dispbox nBottom nRight 1 eColorString ReadKill T nTop nLeft CLEAR To nBottom nRight GetList scroll Top Left Bottom nRight CLEAR SCREEN CLS setpos nRow nCol Scroll APPEND APPEND BLANK dbappend APPEND FROM APPEND FROM xcFile FIELDS idField_list scope WHILE Condition
66. cString1 and following with the content of cString2 nNumberl nNumber2 dDatel dDate2 dDate nNumber Subtraction unary negative cStringl cString2 String concatenation The result is a string containing cStringl after trimming trailing blanks and cString2 idAlias gt idField FIELD gt idVar MEMVAR gt idVar Alias assignment The alias operator implicitly SELECTs the idAlias before evaluating idField When the evaluation is complete the original work area is SELECTed again 1160 ICondition2 Logical AND NOT Condition Logical NOT Condition OR ICondition2 Logical OR nNumberl nNumber2 Division object message argument list Send idVar exp Inline assign expl lt exp2 Less than or equal expl lt gt exp2 Not equal expl exp2 Equal expl exp2 Exactly equal expl gt exp2 Greater than expl gt exp2 Greater than or equal idVar Pass by reference nSubscript nSubscript1 nSubscript2 Array element indicator Delimiters Here is the delimiter list recognised from nB exp list Literal array delimiters list exp list Code block delimiters 1161
67. column positions begin with zero If MEMOREADO nWindowColumn these arguments are not specified the ini tial window position is row zero and the current cursor column position MEMOREAD cFile cString is the name of the file to read from disk It must include an extension if there is one and can optionally include a path MEMOEDIT is a user interface and general purpose text editing function that edits memo fields and long character strings Editing occurs within a specified window region placed anywhere on the cFile screen Uparrow Ctrl HE Move up one line MEMOREAD returns the contents of a text file as a character Dnarrow Ctrl Move down one line string Leftarrow Ctrl S Move left one character Rightarrow Ctrl D Move right one character MEMORY Ctrl Move left one word ee Vt Ctrl eA MEMORY nExp nKbytes Move right one word Rightarrow is a numeric value that determines the type Home Move to beginning of current line nExp of value MEMORY returns End Move to end of current line Ctrl Home Move to beginning of current window 1190 1191 MEMORY returns an integer numeric value representing the amount of memory available MEMORY 0 Estimated total space available for charac ter values MEMORY 1 Largest contiguous block available for character values MEMORY Area av
68. compilations include file specific for nB link file for compilation link file for runtime compilation rmake file to compile with RTLink rmake file to compile with Exospace rmake file to compile with RTLink defining RUNTIME to obtain a small nB runtime version REQUEST PRG STANDARD PRG EXTRA PRG STANDARD CH NB CH NB LNK NB_RUNTI LNK NB_NRMAL NB_EXOSP RMK RUNTI RMK MACRO CH include file to compile and link a macro MACRO LNK link file to compile and link a macro MACRO rmake file to compile and link a macro a simple free library for mouse support un CETP MOUSE ATD der Clipper c 1992 Martin Brousseau How to use nB nB normal syntax is nB parameters macro filename macro parameters To run nB just type the word NB and press Enter to execute It will run in command mode this means that it will look like an old xBASE command prompt To run the program as a macro interpreter type the word NB fol lowed from the macro file name with extention no default extention is supposed If parameters are given after the macro file name these will be available inside the public variables c_Parl c_Par2 Par9 c_Par0 will contain the macro file name see the macro file BROWSE amp nB will terminate execution wh
69. complicated reports without making a complex macro it is called RPT A RPT file is a ASCII file with text mixed with code The text may contain variables usually a field or an expression containing fields To make a complex report some work is needed but surely less than the time needed to make a report program The main purpose of it was to be able to print text with variables typically names and addresses for every record of a particular file Now the RPT system makes something more The integrated text editor Figure u136 5 The integrated text editor UN ED TXT e 2 is an example of letter with insertion of expressions nanoBase contains an integrated text editor not particularly good but very usefull for RPT files as the expression insertion is very easy with the use of the F2 key and whenever there isn t any other editor there 1123 The internal documentation Figure u136 6 The internal documentation bin NB HLP Sere the number of seconds INKEY waits for You specify the value in pacify zero mito th the eroga am l a key i5 zero 5 a key is rere wait for keypress value from 39 to 336 from the buffer If the d buffer is emp INKEY returns zero INKEY returns ues for all ASCII function ctrl ction Alt letter and ctr l tter key combinations
70. creating and accessing the Help Text Files This name help text file is just the name given to it A text Ascii file prepared like this manual may be transformed into a Help Text File that is a simple text with pointers Open help text file This function permits to open a Help Text File and browse it The Help Text File name is required New help text file This function permits to create a new Help Text File that is a help file under the nB style The source is an Ascii file where three kind of information are available Normal text Indexes and pointers Indexes and Pointers are word or phrases delimited with user de fined delimiters indexes are placed inside the text to indicate an argument pointers are placed inside the text to indicate a refer ence to indexes Inside this manual indexes are delimited with and so the titles are here indexes pointers are delimited with lt and gt Only one index per line is allowed only one pointer per line is allowed The Delimiters used do identify indexes and pointers are user defined the _start_ identifier symbol can be equal to the _end_ identifier symbol The symbols used for indexes cannot be used for the pointers So the informations required are SOURCE TEXT FILE the filename of the text source file NAME DESTINATION FILE the filename of the destination Help Text NAME File suggested HLP extention INDEX START CODE _ the index start sym
71. dbUseArea NewArea Driver cDatabase cAlias Shared dbSet Index cIndex1 dbSet Index cIndex2 1246 nB command substitution functions Inside nB there are many functions made only in substitution to other Clipper commands GET nTop nLeft GET Var PICTURE cGetPicture COLOR cColorString WHEN PreExpression VALID lPostExpression Get aGetList nTop nLeft x iif pcount gt 0 Var x Var cGetPicture cColorString bPreExpression b Valid aGetList with this get is the get list array that will be increased SAY nTop nLeft SAY exp PICTURE cSayPicture COLOR cColorString Say nTop nLeft cVar eSayPicture cColorString APPEND FROM APPEND FROM xcFile FIELDS idField list scope WHILE Condition FOR Condition VIA xcDriver dbApp cFileName acFields bForCondition 5 bWhileCondition H nNextRecords nRecord IRest cDriver APPEND FROM xcFile FIELDS idField list scope WHILE Condition FOR Condition DELIMITED xcDelimiter dbDelim f cFileName cDelimiter acFields 2 bForCondition bWhileCondition nNextRecords Record Rest APPEND FROM xcFile FIELDS idField list scope WHILE Condition FOR Condition
72. if an index is active this cannot work so an increment for each call is made WAITPROGRES nIncrement LASTREC This function must be closed calling it with the Close parameter to true T This way internal counters are closed and WAIT PROGRESS is closed too WAITFORO WAITFOR Message gt NIL Shows cMessage until it is called again The wait window is closed when called without parameter or with NIL WAITPROGRESSO WAITPROGRESS nmPercent gt T Shows a wait bar on the screen top depending on the value contained into nPercent nPercent starts form 0 and ends to 1 100 If a value of one or more or NIL is passed the wait window is closed Normal command substitution Clipper works only with functions and commands that are converted into function using the STD CH Here are described some com mand replacement that can be used also with nB macros 2 exp list qout list 2 exp list qqout exp list BOX nTop nLeft nBottom nRight BOX cnBoxString coLoR cColorString 1237 dispbox nTop nLeft nBottom nRight enBoxString SetPos 0 0 cColorString TO ReadKill T nTop nLeft TO nBottom nRight DOUBLE COLOR cColorString GetList nLeft nBottom nRight 2 cColorString
73. is acColBodySep chr 179 is the bottom separation array default is MECH GED chr 193 chr 196 i acColHead is the header array for every column acColFoot is the footer array for every column is the validation array that specify when a abColValid field is properly filled The condition must be specified in code block format 1209 is the message array that permits to show abColMs information at the bottom of browse area 8 The array must be composed with code blocks which result with a character string Color is the color string it may be longer than the usual 5 elements is the color code block array The code block receive as parameter the value con abColColors tained inside the field and must return an array containing two numbers they corre spond to the two color couple from cColor IModify indicates whether the browse can modify data Buttons if True default buttons are displayed aButtons array of buttons aButtons n 1 N the nth button row position aButtons n 2 N the nth button column position aButtons n 3 C the nth button text aButtons n 4 B the nth button code block This function starts the browse of a bidimensional array Only ar rays containing monodimensional array containing the same kind of editable data are allowed The function can handle a maximum of 61 columns BCOMPILEO BCOMPILE cString bBlock Compiles the string cSt
74. label form file used to print data con tained inside ADDRESS DBF ADDRESS FRM a report form file used to print data con tained inside ADDRESS DBF ADDRESS RPT a RPT text file used to print data contained inside ADDRESS DBF MAINMNU amp a macro program source example of a menu that executes some others macro pro grams This example is made to demon strate how nB can execute directly a source code without compiling it This example is made only to taste it it is very slow and only a speedy machine can give the idea of it OMAINMNU amp a macro program source example of a menu that executes some others macro pro grams It is the same as MAINMNU amp but it is made to start the execution of the com piled macros OMAINMNU NB compiled macro program OMAINMNU amp OMAINMNU BAT a batch file to show how to run the execu tion of OMAINMNU 1ADDRESS amp a macro program source example for han dling a DBF file containing addresses in various ways 1ADDRESS NB compiled macro 1ADDRESS amp 2ADDRESS amp a macro program source example for han dling a DBF file containing addresses in various ways a little bit more complicated than IADDRESS amp 2ADDRESS NB compiled macro 2ADDRESS amp 3ADDRESS 6 a macro program source example for han dling
75. length that will be printed The only considered page dimension is the height LPP lines per page Page height Here starts the example 66 lines 001 1 66 002 head 003 004 005 end 006 foot 007 008 009 end 010 1 10 011 text text text 012 test text text At line 001 is defined the page height in lines At line 002 is defined the header it contains two empty lines 003 and 004 which will be printed at the top of every page At line 006 starts the footer definition that contains two empty lines 007 and 008 that will be printed at the end of every page At line 010 is defined the space on the left that will be added to every line printed From line 011 starts the normal text HEADER AND FOOTER The commands HEAD and FOOT are used to define the top and bottom border if they contains empty lines it these lines are not empty they became real head and foot The dimensions are as it follows Top 6 lines should be one inch Bottom 6 lines Left 10 characters should be an inch Page height At position 0 5 in after 3 lines a one line header appears 66 lines should be 11 inch 1253 001 lpp 66 002 head 003 004 005 006 MYFILE TXT 007 008 009 send 010 foot 011 012 013 014 015 016 017 wend 018 left 10 019 text text text 020 test text text At line 006 the fourth header line a text appears
76. length of the formatted line nPos is the byte position within text counting from one TabSi is the number of columns between tab stops If not specified the default is four IWrap is the word wrap flag If not specified the default is true T MPOSTOLC returns an array containing the line and the column values for the specified byte position Pos is a memo function that determines the formatted line and column corre sponding to a particular byte position within cText Note that the line number returned is one relative the column number is zero relative This is compatible with MEMOEDIT nPos is one relative com patible with AT RAT and other string functions NETERRO Net error NETERR INewError IError if specified sets the value returned by NETERR to the specified status INewError can be either true T or false F Setting NETERR to a specified value allows the runtime error handler to control the way certain file errors are handled INewError NETERR returns true T ifa USE or APPEND BLANK fails The initial value of NETERR is false F If the current process is not running under a network operating system NETERR always returns false F NETNAMEO NETNAME cWorkstationName returns the workstation identification as a character string up to 15 character
77. order selecting form the ones opened and associated to the active alias Order list clear This function closes all orders associated to the active alias Relation Contains a pop up menu for relations links with other Aliases Set relation This function permits to establish a relation between a alias and a Child alias showing as a result a unique database is the alias name to connect to the ac CHILD tive alias is the relation expression that specify the rule for the relation The value of this expression is the key to access the Child alias if this Child alias is ac EXPRESSION cessed without index it must be the record number if this Child alias is ac cessed via index it must be a valid in dex key Clear relation This function eliminates any relation that originate form the active alias RDD default Contains a pop up menu for Replaceable Database Driver de faults Show actual RDD default It simply shows the actual Replaceable Database Driver Set default RDD Select a new default Replaceable Database Driver Menu Edit The menu Edit contains functions to access data from the active alias the actual area View This function permits you to view the active alias with eventual relations as a table No edit is allowed To navigate the table use the following keys Enter start field editing PgUp show previous screen page PgDn show next screen pag
78. probabilmente anche le versioni di dBase IV dbview opzioni file_dbf Se viene avviato senza opzioni si ottiene la visualizzazione del contenuto del file indicato nel formato predefinito come si vede dall esempio seguente Articolo 1 Descr bicicletta uomo Prezzo u 500 00 Import pom Scadenza 20011120 Note 5 72 Articolo 2 Descr bicicletta donna Prezzo 550 00 20011120 3 13 bicicletta uomo donna leggera 600 00 20011120 14 Note In realt cos facendo i nomi degli attributi vengono mostrati in modo diverso dal reale utilizzando anche le lettere minuscole ed eliminando i trattini bassi Utilizzando l opzione r la prima tupla apparirebbe cos ARTICOLO 1 DESCR bicicletta uomo PREZZO_U 500 00 IMPORT PUE SCADENZA 20011111 NOTE necessario osservare che gli attributi booleani in questo caso si tratta di quello intitolato IMPORT mostrano solo la lettera per il valore Vero altrimenti non si ha alcuna indicazione inoltre le date vengono espresse secondo il formato aaaammgg Infine dal l esempio non si intuisce ma l attributo NOTE di tipo memo e in questo caso si sono persi i dati I dati contenuti nei file DBF dal momento che sono stati memoriz zati presumibilmente con un sistema operativo Dos utilizzano molto probabilmente un insieme di caratteri ristretto e incompatibile con gli standard
79. recorder is paused it is possi ble to edit all previous recording for example adding more com ments or simply to see what the recorder does Macro compilation A macro file a program contained inside a ASCII file may be compiled into a different file format to speed up execution The source filename and the destination filename are requested Load execute macro A macro file a program in ASCII form or compiled may be executed A macro file may require some parameters This function asks for the macro filename to start and the possible parameter to pass to it Menu Info The menu Info is the information menu ABOUT a brief copyright notice starts the browse of NB HLP the nB Help Text File manual if it is present in the cur MANUAL BROWSE rent directory or it is found in the PATH the Dos SET PATH F1 HELP F1 reminder F3 ALIAS INFO F3 reminder It shows all the available information on the active alias F5 SET OUTPUT TO F5 reminder It defines the output periph eral or file Menu Doc This menu actually appears only inside the DOC function the nB text editor New It starts the editing of a new empty text Open It opens for editing a new textfile Save It saves the text file under editing Save as It saves the text file under editing asking for a new name Set output to It permits to change the default output peripheral the default is the sc
80. returns the leftmost nCount characters of cString as a char acter string If nCount is negative or zero LEFT returns a null string If nCount is larger than the length of the character string LEFT returns the entire string 1188 MAX nExp2 nLarger MAX 4 dExp2 dLarger nExp1 nExp2 dExp1 dExp2 are the numeric values to compare are the date values to compare MAX returns the larger of the two arguments The value returned is the same type as the arguments Max column MAXCOL nColumn 1189 MAXCOL returns column number of the rightmost visible col Ctrl End Move to end of current window umn for display purposes PgUp Move to previous edit window PgDn Move to next edit window MAXROWO Ctrl PgUp Move to beginning of memo Ctrl PgDn Move to end of memo MAXROW gt nRow Return Move to beginning of next line Delete Delete character at cursor MAXROW returns the row number of the bottommost visible row Backspace Delete character to left of cursor for display purposes Tab Insert tab character or spaces Printable characters Insert character Ctrl Y Delete the current line Ctrl T Delete word right Ctrl B Reform paragraph M
81. sicari iraniani 1255 Clean 5 2 cessere mre Rester tee ERR de 1257 Step 1 try to compile with the P parameter 1259 Step 2 understand well the use of code blocks 1259 Step 3 understand the object programming 1260 Step 4 understand the get object 1261 Step 5 trying to stop using commands 1262 Step 6 free yourself from STD CH U 1277 Step 7 take control over all include files 1277 1115 1116 tp informaticalibera net 5 Hi Daniele S amp amp DBF dBase e derivati Il software basato sui file in formato DBF ovvero quelli di dBa se III negli anni 1980 stato molto importante nell ambito del si stema operativo Dos Nel suo piccolo ha permesso agli utenti di quel sistema operativo di realizzare delle strutture di dati che si avvicinavano alle potenzialit di una base di dati relazionale Ancora oggi si trovano programmi applicativi gestionali basati su questo formato scritti probabilmente con il famoso compilatore Clipper Attualmente disponibile il compilatore Harbour che si ripromette di offrire un ambiente totalmente compatibile con il pas sato tuttavia possibile leggere il contenuto di questi file attraverso alcuni piccoli programmi Dbview Il programma dbview consente di leggere il contenuto dei file DBF di dBase III e
82. string constant These three different kind of delimiters are available to resolve some possible problems I don t want it I don t want it She said I love hin gt She said I love hin He said I don t want it gt He said I don t want it The following table shows all operations available inside nB for character data types These operations act on one or more character expressions and the result is not necessarily a character data type LEFT Extract substring form the left LEN Compute string length in characters LOWER Convert letters to lowercase LTRIM Remove leading spaces PADC Pad with leading and trailing spaces PADL Pad with leading spaces PADR Pad with trailing spaces RATO Locate substring position starting from the right RIGHT Extract substring form the right RTRIM Remove trailing spaces SOUNDEX Convert to soundex equivalent SPACE Create a blank string of a defined length STRTRAN Search and replace substring STUFF Replace substring SUBSTR Extract substring TRANSFORM Convert to formatted string UPPER Convert letters to uppercase VALO Convert to numeric VALTYPE Evaluates data type directly Memo The memo data type is used to represent variable length character data that can only exist in the form of a database field Memo fields are no
83. tabs Numeric 0 Date CTOD Logical puo NIL NIL End of file EOF Boundary EOF returns true T when an attempt is made to move the record pointer beyond the last logical record in a database file oth erwise it returns false F If there is no database file open in the current work area EOF returns false If the current database file contains no records EOF returns true EVALO Code block evaluation EVAL bBlock BlockArg list gt LastBlockValue bBlock BlockArg list is the code block to evaluate is a list of arguments to send to the code block before it is evaluated To execute or evaluate a code block call EVAL with the block value and any parameters The parameters are supplied to the block when it is executed Code blocks may be a series of expressions separated by commas When a code block is evaluated the returned value is the value of the last expression in the block EXPO Exponent EXP nExponent gt nAntilogarithm is the natural logarithm for which a nu meric value is to be calculated nExponent EXP returns a numeric value that is equivalent to the value e raised to the specified power FCLOSEO File close FCLOSE nHandle 1 is the file handle obtained previously from nHandle FOPEN or FCREATE
84. the records contained inside the DBF file may not correspond e For the same reason an improper program termination may result in an incomplete data update That is DBF file may be all right INDEX BAG not This is why xBase programs are weak relational databases or they are not relational databases at all When troubles occurs indexes must be rebuild Relations Many DBF files with indexes may be opened simultaneously Data contained inside more DBF files may be somehow connected to gether See the example 02 a n zzzz zzzzzzz zzzzzzzz 01 gt gt bbbbbbb bbbbbbb e m The first DBF file contains some data that refers to an Employee number that may appear repeated on more records Employee informations are stored inside another DBF file that contains only one record for every employee Establishing a relation from the first DBF file to the second mov ing the record pointer of the first DBF file that is the first alias the record pointer of the second the child alias is moved automatically to the record containing the right data The relation is an expression that should result in a number if the child alias is opened without index or in a valid index key if the child a
85. the variable referred to by the set get block specified as a character string cMemvarName MEMVARBLOCK returns a code block that when evaluated sets assigns or gets retrieves the value of the given memory variable If cMemvarName does not exist MEMVARBLOCK returns NIL MINO MIN 1 nExp2 nSmaller MIN 1 dExp2 dSmaller nExp1 nExp2 dExp1 dExp2 are the numeric values to compare are the date values to compare returns the smaller of the two arguments The value returned is the same data type as the arguments 1192 nTabSize defines the tab size The default is four toggles word wrap on and off Specify IWrap ing true T toggles word wrap and false F toggles it off The default is true T MLPOS returns the character position of nLine in cString as integer numeric value If nLine is greater than the number of lines in cString MLPOS returns the length of cString MONTHO MONTH dDate nMonth dDate is the date value to convert MONTH returns an integer numeric value in the range of zero to 12 Specifying a null date CTOD returns zero 1193 MPOSTOLCO Memo position to line column MPOSTOLC cText nWidth nPos aLineColumn cText is a text string nWidth is the
86. there isn t the possibility to create functions but there is an alternative code blocks Create a big code block A code block cannot be longer than 254 characters as any other instruction inside nB So there is no way to make a bigger code block but a code block can call another code block and so on For example mempublic first second third first eval second hello second x eval third x third x alertbox x eval first 1254 This stupid example simply will show the alert box containing the word hello The source files The nB source is composed of four files The main source file containing essentially the nB menu Contains a link to all Clipper standard functions Contains the most important standard func tions Contains some extra function not abso lutely necessary during macro execution NB PRG REQUEST PRG STANDARD PRG EXTRA PRG The file REQUEST PRG source file generates some warnings be cause not all functions listed there are directly called form nB Don t worry about that warning message Different rmake files are included to compile nB differ ently including excluding some program parts for example to ob tain a runtime executor This is the original documentation of nanoBase 1997 with minor modifications that appeared originally at http
87. using xExpr with cPicture STRLISTASARRAYO STRLISTASARRAY cList cDelimiter gt aList character string containing a list cList rated with cDelimiter the delimiter used to separate the elements cDelimiter PS contained inside list This function transform a character string list into an array STROCCURSO STROCCURS cSearch cTarget nOccurrence cSearch the search string to find inside the string to be searched for the presence cTarget of cSearch This function returns the number of occurrence that cSearch is con tained inside cTarget STRPARENTO STRPARENT cName cParentPath the pathname cName This function tries to return a parent path from cName 1234 STRPATH eName cPath cName the pathname This function tries to extract the path from cName STRTEMPPATHO STRIEMPPATH cTempPath This function returns a temporary path searching for possible defini tions inside the environmental variables STRXTOSTRINGO STRXTOSTRING xVar cTrasformed to string is the data of any type to be converted into TEM string is the type of the data contained inside cType xVar This function returns x Var transformed into a character string TBO
88. www geocities com SiliconValley 7737 nb htm 1255 1256 Copyright Daniele Giacomini appunti2 gmail com http informaticalibera net 2 2013 11 11 Clean the Clipper 5 2 Step 1 try to compile with the P parameter 1259 Step 2 understand well the use of code blocks 1259 Step 3 understand the object programming 1260 Classes and Methods te eR Rd e e Xe 1260 Class definitloh i os sees toe deve extre peser exo 1260 Object creation 1260 Instantiating an object eos t Re 1260 The send symbol canini eer Ree rr RS 1261 More about objects 1261 Step 4 understand the get object 1261 Step 5 trying to stop using commands 1262 UTE cia e 1263 BOX iii 1263 O GET i 1263 O SAY OO 1263 CM K O nia ene 1263 APPEND iii a 1264 APPEND FROM dr 1264 CLEAR EEE EEDA 1264 CLOSE iii rata 1265 COMMI icaro pone 1265 CONTINUE 9 1265 COBY 1265 COUNT csi 1266 CREATE sirio eo are 1266 1266 DELETE criari 1267 QUIT eta ara 1268 READ
89. BVAL cox ce exa cay ERE EXEC 1163 2 Rr RR cee Weare E ERE VERRE aes 1163 AINSI ECT 1164 ALERT sano 1164 ALIAS x a 1164 ALLTRIM eeu SR 1164 5 524555255 69 eS 1165 ASCO ic 1165 ASCAN d ae ea 1165 ASIZE pesata 1165 1127 ria 1165 MO 1166 DATE iaia 1166 BINDI 1166 BINL 1166 uA 1167 NAI 1167 1167 CHR ta aa 1167 2 1167 COL 1167 COLORSELECT 1168 1168 CURDIR 2 2 2 2 2 2 2 2 2 1168 DATE ei 1168 DO 1168 DBAPPEND eee ee e essere 1168 DBCLEARFILTER 1169 DBCLEARINDEX 1169 DBCLEARRELATION 1169 DBCLOSEALL 2 2 2 2 2 1169 DBCLOSEAREA 2 1169 DBCOMMIT 2 2 1169 DBCOMMITALL 2 1169 iii 1169 DBCREATEINDEX 1170 1170 DBEVALO 1170 DBFILTER 2 1171 DBGOBOTTOM 2 1171 DBGOLO siete ii 1171 ere cte ia 1171 DBRECALL si 1171 DBREINDEX
90. Bag name is sought is a character string that represents the name of the target Order whose Order Bag name is sought nOrder cOrderName ORDBAGNAME returns a character string the Order Bag name of the specific Order ORDCREATEO ORDCREATE cOrderBagName cOrderName cExpKey bExpKey Unique gt NIL cOrderBagName is the name of a disk file containing one or more Orders cOrderName is the name of the Order to be created is an expression that returns the key value to place in the Order for each record in the cExpKey current work area The maximum length of the index key expression is determined by the database driver is a code block that evaluates to a key value bExpKey that is placed in the Order for each record in the current work area specifies whether a unique Order is to IUnique be created Default is the current global SET UNIQUE setting ORDCREATE is an Order management function that creates an Order in the current work area It works like DBCREATEINDEX except that it lets you create Orders in RDDs that recognize multiple Order Bags ORDDESTROYO ORDDESTROY cOrderName cOrderBagName 1 gt NIL OrderN is the name of the Order to be removed from the current or specified work area cOrderBagName is the name of a disk file containing one or more Orders ORDDESTROY is an Order management function tha
91. CLEAR GETS nTop nLeft TO nBottom nRight COLOR cColorString ReadKill T nLeft nBottom nRight 1 GetList nTop nLeft CLEAR nRight CLEAR SCREEN CLS scroll Top Left nRight Scroll setpos nRow nCol 0 0 GET CLOSE nTop GET Var PICTURE cGetPicture COLOR cColorString WHEN IPreExpression lt VALID PostExpression CLOSE dbCloseArea setpos nTop CLOSE idAlias aadd GetList _GET_ Var Var cGetPicture IPostExpression lt gt idAlias gt dbCloseArea HD IPreExpression display atail GetList colorDisp cColor CLOSE ALTERNATE SAY nTop nLeft SAY exp COLOR cColorString Set 19 devpos nTop nLeft CLOSE DATABASES devout exp cColorString dbCloseAll nTop nLeft SAY exp PICTURE cSayPicture COLOR cColorString CLOSE INDEXES devpos nTop nLeft dbClearIndex COMMIT devoutpic exp cSayPicture cColorString COMMIT APPEND APPEND BLANK dbCommitAll COUNT dbappend COUNT TO idVar FOR WHILE IWhileCondition CLEAR NEXT nNextRecords
92. D 32 define SET DELIMITERS 33 define SET DELIMCHARS 34 define SET WRAP 35 define SET MESSAGE 36 define SET MCENTER 37 define SET SCROLLBREAK 38 SETCURSOR define SETCURSOR NONE 0 No cursor define SETCURSOR NORMAL 1 Normal cursor underline define SETCURSOR INSERT 2 Insert cursor lower half block define SETCURSOR SPECIAL1 3 Special cursor full block 4 define SETCURSOR_SPECIAL2 Special cursor upper half block RDD REQUESTs external dbfndx external dbfntx default 1 This material appeared originally at http www geocities com SiliconValley 7737 clipper52clean html in 1996 Clipper 5 2 Proprietary software 1281 1282
93. Dirs true T means include directory names Files true T means include file names INoRirR true T means do not return shown directory if Esc is used to exit 1217 nSortColumn the column number to use to sort the list The columns are Name 1 Size 2 Date 3 Time 4 Attribute 5 It is not possible to sort for extention It is a window function useful to search a file or a directory The complete pathname of the selected file is returned DOCO DOC cTextFileName gt NIL can contain the text file to open and edit GET aGetList nLeft x iif pcount gt 0 Var x Var cGetPicture cColorString bPreExpression j 5 Valid GetList is the get list array that will be increased aGetLisi with this get nTop and nLeft define the starting position of this get ob ject on the screen is the variable that is to be edited with this cTextFileName if empty the editing of UNTITLED TXT will start It is the nB Text editor useful for small text files less then 64K and contains a complete menu that can be started with F10 Attention doc should not be used inside macros DOTLINEO DOTLINE NIL This function is a dot command line useful for calculations reso luti
94. EBUG SET TYPEAHEAD COLOR SET CURSOR ET CONSOLE ALTERNATE ET ALTFILE ET DEVICE SET EXTRA SET EXTRAFILE PRINTER SET_PRINTFILE SET_MARGIN SET INTENSITY SET SCOREBOARD SET DELIMITERS SET DELIMCHARS WRAP SET MESSAGE _MCENTER ET SCROLLBREAK SET ALTERNATE TO xcFile ADDITIVE Set _SET_ALTFILE cFile 1Additive SAVE SCREEN TO SET ALTERNATE ON OFF xlToggle cScreen savescreen 0 0 maxrow maxcol 1270 1271 Set _SET_ALTERNATE ON OFF IToggle Set SET DELIMITERS ON OFF Toggle SET BELL ON OFF xlToggle SET DELIMITERS TO DEFAULT Set _SET_BELL ON OFE IToggle Set _SET_DELIMCHARS SET COLOR COLOUR TO cColorString SET DELIMITERS TO cDelimiters SetColor cColorString Set SET DELIMCHARS cDelimiters SET CONFIRM ON OFF xlToggle SET DEVICE TO SCREEN PRINTER Set SET CONFIRM ON OFF IToggle Set DEVICE SCREEN PRINTER SET CONSOLE ON OFF xlToggle SET EPOCH TO nYear Set SET CONSOLE ON OFF IToggle Set SET EPOCH nYear SET CURSOR ON OFF xlToggle SET ESCAPE ON OFF xlToggle SetCursor 1 0 iif IToggl
95. EMOEDIT eString Ctrl V LIns Toggle insert mode nTop Ctrl Finish editing with save nRight Esc Abort edit and return original IEditMode cUserFunction MEMOLINEO nLineLength nTabSize nTextBufferRow MEMOLINE cString nTextBufferColumn nLineLength nWindowRow nLineNumber nWindowColumn gt cTextBuffer nTabSize cString is the character string or memo field to 2 copy to the text buffer eStrin is the memo field or character string from nTop nLeft nBottom are window coordinates The default coor 8 which to extract line of text nRight dinates are 0 0 MAXROW and MAX specifies the number of characters per line COLO nLineLength and can be between four and 254 If not determines whether the text buffer can be specified the default line length is 79 IEditMode edited or merely displayed If not speci is the line number to extract If not speci fied the default value is true T nLineNumber fied the default value is one is the name of a user defined function that defines the tab size If not specified the executes when the user presses a key not ilaria default value is four cUserFunction recognized by MEMOEDIT and when toggles word wrap on and off Specifying keys are pending in the keyboard buffer Wrap true T toggles word wrap on false determines the length of lines displayed C F toggles it o
96. ENAME this is the name of the index bag the expression that defines the rule for KEY EXPRESSION the record ordering this is the name to give to the order tag when the RDD permits to have a ORDER NAME index bag containing more than one or der In the other case the index bag name correspond to the order name a FOR condition to filter records before FOR EXPRESSION i indexing Open index If a index file already exists it can be associated to the active alias simply opening it Take note that the system is not able to verify if the index belong the active alias and if it is not so a error will result is the name of the index bag file to open INDEX NAME Alias Contains a pop up menu for logical databases alias operations Select Only one may be the active alias and with this function the active alias may be changed choosing from the list of used areas Selecting the area number zero no alias is active Display structure With this function the active alias structure may be viewed Close active alias Selecting this function the active alias is closed That is the DBF file and eventual indexes are closed Close all aliases With this function all Aliases are closed 1143 Order Contains a pop up menu for logical indexes orders Order list rebuild This function rebuild the indexes opened and associated to the active alias Order set focus This function permits to change the active
97. ERBC DEVICE SETVERB DEVICE Device cPrevious cDevice is the name of the device where SAY will display its out put The starting value is SCREEN the alternative is PRINTER The recommended value is SCREEN SETVERBC EXTRA SETVERB EXTRA Extra IPrevious If IExtra is True the output of console commands is send also to a standard ASCII text file The starting value is False SETVERBCEXTRAFILE SETVERB EXTRAFILE cExtraFilename Additive cPrevious If SETVERB EXTRA is True the output of the console is send also to cExtraFilename a standard ASCII file If lAdditive is True the output is appended to the ASCII file if it already exists else it is erased first SETVERBCPRINTER SETVERB CURSOR SETVERB CURSOR IPrevious If ICursor is True the cursor is showed else it is hidden The starting value is True SETVERB CONSOLE SETVERB CONSOLE Console gt IPrevious If Console is True the output of console commands is displayed on the screen else it is not The starting value is True SETVERBC ALTERNATE SETVERB ALTERNATE Alternate gt Previous If Alternate is True the output of console commands is send also to a standard ASCII text file The starting value is False 1230 SETVERB
98. ERIC_CLOSE define ERROR_GENERIC_READ define ERROR_GENERIC_WRITE define ERROR_GENERIC_PRINT define ERROR_GENERIC_UNSUPPORTED define ERROR_GENERIC_LIMIT define ERROR_GENERIC_CORRUPTION define ERROR_GENERIC_DATATYPE define ERROR_GENERIC_DATAWIDTH define ERROR_GENERIC_NOTABLE define ERROR_GENERIC_NOORDER define ERROR_GENERIC_SHARED define ERROR_GENERIC_UNLOCKED define ERROR_GENERIC_READONLY define ERROR_GENERIC_APPENDLOCK define ERROR_GENERIC_LOCK Win o 12 13 14 15 16 17 18 20 21 22 23 24 25 30 31 32 33 34 35 36 37 38 39 40 41 INKEY define K_UP 5 define K_DOWN 24 define K_LEFT 19 define K_RIGHT 4 define i define K_END 6 define K_PGUP 18 define K_PGDN 3 Il Il Il Il Up arrow Ctrl E Down arrow Ctrl X Left arrow Ctrl S Right arrow Ctrl D Home Ctrl A End Ctrl F PgUp Ctrl R PgDn Ctrl C define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define
99. En Aes 1269 RECALL ie age 1269 REINDEX 1269 RELEASE 2 4455 555 tre Re 1269 lt aria 1270 REPLACE suora e re eris 1270 REPORT FORM pioli 1270 RESTORE ignara uere b Ne dus 1270 RESTORE PROM urlano CREE Es quet 1270 RUN osse 1270 SAVE SCREEN sopra 1270 SAVE On 25 1270 SEEK ot eq eiie 1271 SELECT ae 1271 SET iii rns tox WE HI Re 1271 SKIP iii UNE UE 1276 STORE ES 1276 SUM priore TR E NODE TR RUE 1276 TOTAL ON ea ea px EN HO aes 1276 UNLOCK ira HE S exe e ed eb Pe uetus 1276 UPDATE FROM s rare lata 1276 USE arl aerei enni 1277 E 1277 Step 6 free yourself from STD CH U 1277 Step 7 take control over all include files 1277 A different way to program using Clipper 5 2 without commands that is without the file STD Step 1 try to compile with the P parameter 1259 Step 2 understand well the use of code blocks 1259 Step 3 understand the object programming 1260 Classes and methods 15 4 seeker Re ERR Er 1260 Class definition eunt Ee 1260 Object creation err e e Ra Ye 1260 Instantiating objet eerte ems 1260
100. F cName xcAlias IShared IReadonly DBUSEAREA opens the specified database DBF DBDELETEO DELETED IDeleted DELETED returns true T if the current record is marked for deletion otherwise it returns false F If there is no database file in USE in the current work area DELETED returns false PR DESCENDO DESCEND exp gt ValueInverted is any valid expression of character date P logical or numeric type DESCEND returns an inverted expression of the same data type as the exp except for dates which return a numeric value A DE SCEND of CHR 0 always returns CHR 0 DEVOUTO Device output DEVOUT exp cColorString gt NIL is the value to display is an optional argument that defines the dis play color of exp cColorString is a full screen display function that writes the value of a single expression to the current device at the current cursor or printhead position DEVOUTPICTO Device output picture DEVOUTPICT exp cPicture cColorString NIL 1175 exp is the value to display defines the formatting control for the dis cPicture play of exp cColorString is an optional argument that defines the dis play color of exp DEVOUTPICT is a full screen display function that writes t
101. FIND NEXT nNextRecords gt RECORD nRecord REST ALL COUNT TO idVar FOR lForCondition WHILE IWhileCondition FIND xeSearchString dbSeek cSearchString nNextRecords nRecord lRest dbeval idVar idVar 1 lForCondition IWhileCondition lt gt cAlias CREATE CREATE xcDatabase FROM xcExtendedDatabase NEW ALIAS cAlias VIA cDriver GbCreate cDatabase cExtendedDatabase Driver New DEFAULT DEFAULT xVar TO xDefaultValue if xVar NIL xVar xDefaultValue end 1266 GO O TO nRecord dbgoto nRecord BOTTOM dbGoBottom o ro TOP dbgotop INDEX ON le SE ASCENDING DESCENDING INDEX ON expKey UNIQUE WHILE WhileCondition EVAL lEvalCondition EVERY nRecords FOR gt 1267 ordCondSet cForCondition bForCondition bWhileCondition lt gt bEvalCondition Records RECNO ordCreate cIndexName cExpKey bExpKey lUnique JOIN JOIN WITH xcAlias TO xcDatabase FOR ICondition FIELDS idField list dbJoin cAlias cDatabase acFields P bForCondition KEYB
102. IL is the name of a disk file containing one or cOrderBagName more Orders the name of the specific Order from the Or der Bag to be added to the Order List of the cOrderName current work area If you do not specify cOrderName all orders in the Order Bag are added to the Order List of the current work area ORDLISTADD is an Order management function that adds the contents of an Order Bag or a single Order in an Order Bag to the Order List Any Orders already associated with the work area continue to be active If the newly opened Order Bag contains the only Order associated with the work area it becomes the controlling Order otherwise the controlling Order remains unchanged ORDLISTCLEARO ORDLISTCLEAR NIL ORDLISTCLEAR is an Order management function that removes all Orders from the Order List for the current work area ORDLISTREBUILDO ORDLISTREBUILD NIL ORDLISTREBUILD is an Order management function that re builds all the orders in the current Order List 1196 ORDNAME nOrder L cOrderBagName cOrderName is an integer that identifies the position in nOrder the Order List of the target Order whose database name is sought cOrderBagName is the name of a disk file containing one or more Orders ORDNAME returns the name of the specified Order in the current Order List or the specified Order Bag if opened in the Current Order
103. IXED 1228 SETVERB DECIMALS 1228 SETVERB DATEFORMAT 1228 SETVERB EPOCH 1228 SETVERB PATH 2 2 0 1228 SETVERB DEFAULT 1229 SETVERB EXCLUSIVE 1229 SETVERB SOFTSEEK 1229 SETVERB UNIQUE obsolete 1229 SETVERB DELETED 1229 SETVERB CANCEL 1229 SETVERB TYPEAHEAD 1229 1132 SETVERB COLOR Rx hr 1229 SETVERB CURSOR 1230 SETVERB CONSOLE 1230 SETVERB ALTERNATE 1230 SETVERB ALTHILE 1231 iaia 1231 SETVERB EXTRA viet VIE adi 1231 SETVERB EXTRAFILE 1231 SETVERB PRINTER yer PR REY Rr 1231 SETVERB PRINTFILE 1231 1231 SETVERB BELL b RR be 1231 pull 1231 SETVERB ESCAPE RC REP 1232 SETVERB INSBRT iii 1232 SETVERB EXIT iii 1232 SETVERB INTENSITY 1232 SETVERB SCOREBOARD 1232
104. If IReleaseRecLocks is false F all pending record locks are maintained and the new record is added to the end of the Lock List The default value of IReleaseRecLocks is true T IReleaseRecLocks DBAPPEND adds a new empty record to the active alias 1168 DBCLEARFILTER clears the logical filter condition if any for the current work area DBCLEARINDEXO DBCLEARINDEX gt NIL DBCLEARINDEX closes any active indexes for the active alias DBCLEARRELATIONO DBCLEARRELATION NIL DBCLEARRELATION clears any active relations for the active alias DBCLOSEALLO DBCLOSEALL gt NIL DBCLOSEALL releases all occupied work areas from use It is equivalent to calling DBCLOSEAREA on every occupied work area Attention DBCLOSEALL cannot be used inside a compiled macro as this will stop the macro execution In substitution DB CLOSE should be used DBCLOSEAREAO DBCLOSEAREA gt NIL DBCLOSEAREA releases the current work area from use DBCOMMITO DBCOMMIT NIL DBCOMMITY causes all updates to the current work area to be writ ten to disk updated database and index buffers are written to DOS and a DOS COMMIT request is issued for the database dbf file and any index files associated with the work area Inside a net work environment DBCOMMIT makes database updates visible to othe
105. OARD KEYBOARD cString Keyboard eString gt NIL LABEL FORM LABEL FORM xcLabel TO PRINTER TO FILE xcFile NOCONSOLE scope 4 WHILE Condition FOR SAMPLE LabelForm cLabel ToPrinter A r gt IRest Sample bForCondition bWhileCondition 2 F Record LIST LIST exp list PRINTER FILE xcFile scope lt gt WHILE Condition FOR ICondition OFF __dbList ToDisplay abListColumns 1 BForCondition bWhileCondition me nNextRecords 5 Rest E IToPrinter cFileName LOCATE LOCATE scope FOR Condition WHILE ICondition dbLocate bForCondition bWhileCondition nNextRecords y nRecord P Rest PACK PACK dbPack QUIT QUIT Quit 1268 READ READ ReadModal GetList GetList READ SAVE ReadModal GetList RECALL RECALL dbRecall RECALL FOR lForCondition NEXT nNextRecords gt lt gt RECORD nRecord REST WHILE IWhileCondition ALL nNextRecords dbeval dbRecall nRecord IRest IForCondition lWhileCondition
106. OX_SINGLE G CHR 218 CHR 196 CHR 191 179 217 196 192 CHR 179 1277 Double line box define BOX_DOUBLE G CHR 201 CHR 205 CHR 187 CHR 186 CHR 188 CHR 205 CHR 200 CHR 186 x xpo mo Single line top double line sides define BOX SINGLE DOUBLE li CHR 214 CHR 196 CHR 183 CHR 186 CHR 189 CHR 196 CHR 211 CHR 186 Double line top single line sides define BOX_DOUBLE_SINGLE G CHR 213 CHR 205 CHR 184 CHR 179 CHR 190 CHR 205 CHR 212 CHR 179 ERRORS Severity levels e severity define ERROR_SEVERITY_WHOCARES define ERROR_SEVERITY_WARNING define ERROR_SEVERITY_ERROR define ERROR_SEVERITY_CATASTROPHIC Generic error codes e genCode define ERROR_GENERIC_ARG define ERROR_GENERIC_BOUND define ERROR_GENERIC_STROVERFLOW define ERROR_GENERIC_NUMOVERFLOW define ERROR_GENERIC_ZERODIV define ERROR_GENERIC_NUMERR define ERROR_GENERIC_SYNTAX define ERROR_GENERIC_COMPLEXITY define ERROR_GENERIC_MEM define ERROR_GENERIC_NOFUNC define ERROR_GENERIC_NOMETHOD define ERROR_GENERIC_NOVAR define ERROR_GENERIC_NOALIAS define ERROR_GENERIC_NOVARMETHOD define ERROR_GENERIC_BADALIAS define ERROR_GENERIC_DUPALIAS define ERROR_GENERIC_CREATE define ERROR_GENERIC_OPEN define ERROR_GEN
107. P dbZap RPT the nB print function The function RPT helps to print ASCII file containing Memvars Fields and print commands RPT is accessible from the DOC menu Memvars and fields As usual with standard word processors variables are written delim ited with lt Alt 174 and gt Alt 175 Inside these delimiters can find place character Memvars character Fields and functions giving a character result The RPT function generates a public variable n_Lines that contains the available lines inside the actual sheet Every time a line is writ ten this value is reduced until a new page is reached and then it will start again from the maximum value It is useful to read this variable to determinate if there is enough space or it is better to change page Commands The function RPT recognise some print commands These com mands starts with the asterisk symbol This means that is a print command prefix It follows the command syntax 1251 COMMAND COMMAND cStatement cStatement The lines contained inside are executed with the nB macro interpreter DBSKIP DBSKIP nSkip It Executes a dbskip on the active alias FOOT FOOT cFooter cFooter END The lines contained inside FOOT END are printed each time at the bottom of pages HEAD HEAD cHeader cH
108. PRINTER Printer Previous If Printer is True the output of console commands is also printed else it is not The starting value is False SETVERBC PRINTFILE SETVERB PRINTFILE cPrintFileName cPrevious cPrintFileName is the name of the printer peripheral name The starting value is SETVERBCMARGIN null string SETVERB MARGIN nPageOffset nPrevious nPageOffset is the positive number of column to be used as a left margin for all printer output The starting value is 0 SETVERBC BELL SETVERB BELL Bell Previous If is True the sound of the bell is used to get the attention of the user when some wrong actions are made The starting value is False 1231 SETVERB CONFIRM SETVERBCDELIMCHARS SETVERB CONFIRM Confirm gt IPrevious SETVERB DELIMCHARS cDelimterCharacters cPrevious If Confirm is False the GET is simply terminated typing over the end of the get field in the other case True the GET is terminated only pressing an exit key The starting value is True SETVERBCESCAPE SETVERB ESCAPE Escape gt Previous If Escape is True the Esc key is enabled to be a READ exit key in the other case not The starting value is True The recommended value is True SETVERBC INSERT cDelimterCharacters are th
109. Parte xxxii File DBF File dBase derivati 1117 lu MC 1117 1997 adie iraniani 1121 Whats sich aids iii ta 1121 Th dot command Une 1 acini 1121 TRE Men gander 1121 The macro recording compiling and execution 1122 ThE report System crise 1123 The integrated text editor 1123 The internal documentation 1124 Download it esce 1124 Bugs and known problems 1124 nanoBase 1997 user manual 1127 DOS cca e eem A ERE EAR 1134 COMPOSITION circa 1137 How t0 USe Bia gt 1139 Status line ee 1140 aiar 1140 The men systerti ui cirie 1140 The text editor DOCO i 1149 The leoni 1150 Macon 1150 Data types 1154 Operators Me 1160 Delimitetsc staranno 1161 Code blocks tM PEU 1162 Standard functions 1162 NB FUNCTIONS siii aio 1208 Normal command substitution 1237 nB command substitution functions 1247 RPT the nB print function lt 52 555 54 556 55565 565 1251 HOw Can 1254 The source files i
110. PgDn End document Del Delete character right Backspace Delete character Left Tab Insert tab Ins Toggle insert overwrite Enter Next line Ctrl Y Delete line Ctrl T Delete word right Alt M DOC menu The help text file nB provides a basic hypertext system to build simple help files A source text file with indexes and pointers to indexes is translated into a help text file a DBF file then this file is browsed by nB The source file can have a maximum line width of 80 characters each line can terminate with CR or CR LF Indexes are string delimited by index delimiters default pointers are string delimited by pointer delimiters default lt and gt and refers to indexes Inside a text indexes must be unique pointers can be repeated any where A text can contain a maximum of 4000 indexes Inside this manual titles are delimited with as they are indexes strings delimited with lt and gt identify a reference to a title with the same string To browse a previously created Help Text File use the following keys Esc Exit UpArrow Move cursor up DownArrow Move cursor down PgUp Move cursor PageUp PgDn Move cursor Pagedown Ctrl PgUp Move cursor Top Ctrl PgDn Move cursor Bottom Enter Select a reference pointer lt Go to previous selected reference pointer gt Go to next selected refer
111. RD DELIMITERS DELIMCHARS WRAP MESSAGE MCENTER SETVERBCEXACT obsolete SETVERB EXACT Exact IPrevious 1227 If IExact is True it forces exact comparison of character strings including length If it is False character strings are compared until the left string length is exhausted that is that the null string is equal to any other string Please note that the operator is a comparison operator for exact match and using it SETVERB EXACT F will not work The starting value is True the recommended value is True SETVERBCFIXED SETVERB FIXED Fixed IPrevious If Fixed contains True numeric values are displayed ever with a fixed number of decimal digits depending on the value set by SETVERB DECIMALS The starting value is False The recommended value is False if you have to display a fixed num ber of decimal digits it is better to define a good display picture SETVERB DECIMALS SETVERB DECIMALS Decimals gt nPrevious nDecimals is the number of digits to display after the decimal posi tion This set is enabled of disabled with SETVERB FIXED The starting value is 8 SETVERB DATEFORMAT SETVERB DATEFORMAT DateFormat cPrevious cDateFormat is a character expression that specifies the date format The starting value is dd mm yyyy Some date forma
112. SDF dbSDF f cFileName acFields 5 bForCondition y b WhileCondition 1 Record Rest 1247 CONTINUE CONTINUE dbContinue COPY COPY FILE xcSourceFile TO xcTargetFile xcDevice CopyFile cSourceFile cTargetFile cDevice COPY STRUCTURE FIELDS idField list TO xcDatabase dbCopyStruct cDatabase acFields COPY STRUCTURE EXTENDED TO xcExtendedDatabase dbCopyXStruct cExtendedDatabase COPY TO xcFile FIELDS idField list scope WHILE Condition FOR Condition VIA xeDriver dbCopy cFileName acFields bForCondition bWhileCondition nNextRecords nRecord E IRest cDriver COPY TO xcFile FIELDS idField list scope WHILE Condition FOR Condition DELIMITED xcDelimiter dbDelim t cFileName cDelimiter acFields bForCondition bWhileCondition nNextRecords P n Record Rest COPY TO xcFile FIELDS idField list scope WHILE Condition FOR ICondition SDF dbSDF t cFileName acFields bForCondition 1 bWhileCondition nNextRecords Record E Rest 1248 CREATE CREATE xcDatabase FROM xcExtendedDatabase NEW ALIAS cAlias VIA eDriver dbOldCreate cDatabase cExtendedDatabase Driver iNew
113. SETVERB DELIMITERS 1232 SETVERB DELIMCHARS 1233 SETVERB WRAP isla aaa aa 1233 SETVERB MESSAGE Licia 1233 SETVERB MCENTER in 1233 STRADDEXTENTION gi fc 1233 1233 STERDRIVEO scaatcontsionsced a 1233 STREXTENTION 1 as iano 1234 STREILE 1234 STRFILEFIND 1234 STRGETIEN 1234 STRLISTASARRAY 1234 STROCCURS cry 1234 STRPARENT 1234 STRPATEH Q0 inn 1235 STRTEMPPATH 1235 STRXTOSTRING0 uri oor peri easels 1235 Tira 1235 TEXT 1236 TGLINSERTI spara 1236 TIMEXZN segreta 1236 TIMEN2H ss cubano ab orali 1236 TIMEN2M 1236 TIMENS tux xc e earn 1237 522955250699 ERR EY UE 1237 kh e fel 1237 WAITFOR rr ni 1237 WAITPROGRESS i e 1237 Normal command substitution 1237 nB command substitution functions 1247 RPT the print function ira 1251 Memvars a
114. STRO returns a character string up to 65 535 64K bytes null return value indicates an error or end of file FREADSTR is a low level file function that reads characters from an open binary file beginning with the current DOS file pointer position Characters are read up to nBytes or until a null character CHR 0 is encoun tered characters are read including control characters except for CHR 0 The file pointer is then moved forward nBytes If nBytes is greater than the number of bytes from the pointer position to the end of the file the file pointer is positioned to the last byte in the file FRENAMEO File rename FRENAME cOldFile cNewFile gt nSuccess is the name of the file to rename including the file extension A drive letter and or path name may also be included as part of the filename is the new name of the file including the file extension A drive letter and or path cNewFile name may also be included as part of the name FRENAME returns 1 if the operation fails and zero if it succeeds FSEEKQ File seek FSEEK nHandle nOffset nOrigin gt nPosition is the file handle obtained from FOPEN nHandle FCREATE or predefined by DOS is the number of bytes to move the file pointer from the position defined by nOffset nOrigin It can be a positive or nega tive number A positive number moves the pointer forward and a negative
115. T If an attempt is made to move before the first record RECNO returns the record number of the first logical record in the database file and BOF returns true If no database file is open RECNO will return a zero RECSIZEO Record size RECSIZE gt nBytes RECSIZE returns as a numeric value the record length in bytes of the database file open in the current work area RECSIZE re turns zero if no database file is open REPLICATEO REPLICATE cString nCount cRepeatedString cString is the character string to repeat is the number of times to repeat cString nCount REPLICATE returns a character string Specifying a zero as the nCount argument returns a null string RESTSCREENO Restore screen RESTSCREEN Top Bottom Right eScreen gt NIL define the coordinates of the screen in formation contained in cScreen If nTop nLeft the cScreen was saved without coordi nRight nates to preserve the entire screen no screen coordinates are necessary with RESTSCREEN is a character string containing the saved cScreen screen region RESTSCREEN is a screen function that redisplays a screen region saved with SAVESCREEN The target screen location may be the same as or different than the original location when the screen region was saved 1200 is a network
116. TADD 2 1 1196 ORDLISTCLEAR 1196 ORDLISTREBUILD 1196 ORDNAME 020 1197 ORDNUMBER 2 1197 ORDSETFOCUS 1197 1197 1197 OUTSTDO 2 2 2 2 2 1197 PADD ai a 1198 POOL ie ta 1198 PROVO e 1198 gin e iii 1198 RATO 1199 RDDLISTO ra 1199 2 0 22 2 1199 RDDSETDEFAULT 1199 READINSERT 2 1199 READMODAL 1199 READVAR 24 1200 REGNO cn iaia 1200 RECSIZE 2 2 1200 1200 RESTSCREEN 2 2 1 1200 RIGHT 2 4 2 4 2 4 1201 2 2 0 12 7 1201 2 2 2 2 2 2 4 1201 0 2 2 2 2 2 2 7 2 2 2 2 1201 2 2 0 0 1201 SAVESCREEN 4 1201 SCROLL 2 2 2 2 2 2 22 1202 SECONDS 21 4 1202 SELECT
117. TCOLOR nColorIndex COLORSELECT activates the specified color pair from the current list of color attributes established by CTODO Character to date cDate dDate is a character string consisting of numbers representing the month day and year sep arated by any character other than a num ber The month day and year digits must be specified in accordance with the SET DATE format If the century digits are not specified the century is determined by the rules of SET EPOCH cDate CTOD returns a date value If cDate is not a valid date CTOD returns an empty date CURDIRO Current directory CURDIR eDrivespec cDirectory specifies the letter of the disk drive to query If not specified the default is the current DOS drive cDrivespec CURDIR returns the current DOS directory of the drive specified by cDrivespec as a character string without either leading or trailing backslash V characters DATEO DATE gt dSystemDate returns the system date as a date value DAYO DAY dDate gt dDate is a date value to convert DAY returns the day number from dDate DBAPPENDO DBAPPEND IReleaseRecLocks gt NIL is a logical data type that if true C T clears all pending record locks then appends the next record
118. TPUTO SETOUTPUT cPeriperal aPeripheral gt aPrevious_Output_Peripherals Peripheral is the new output peripheral for qout and qqout functions x are the new output peripherals configura aPeripheral tions for qout and qqout functions nB is organised in the way to have only one output peripheral at the time This function help to make order inside SET CONSOLE SET PRINTER and SET ALTERNATE If cPeripheral contains CON SET CONSOLE is set to ON SET PRINTER is set to OFF SET ALTERNATE is set to OFF PRN SET CONSOLE is set to OFF SET PRINTER is set to ON SET ALTERNATE is set to OFF same as otherwise SET CONSOLE is set to OFF SET PRINTER is set to OFF SET ALTERNATE is set to ON SET ALTERNATE TO is set to cPeripheral aPeripheral is organised this way aPeripheral 1 SET CONSOLE aPeripheral 2 SET PRINTER aPeripheral 3 _ _ aPeripheral 4 SET ALTFILE aPeripheral 5 SET EXTRA aPeripheral 6 SET EXTRAFILE This function is necessary because SET ALTERNATE alone is not enough to print on the screen when the peripheral name is CON or to print on the printer when the peripheral name is PRN or LPT1 In fact in the first case ROW and COL will not be updated in the second case PROW and PCOL will not be updated This function returns an array organised in the same way as aPeripheral is that shows the
119. ZE Resize an array ASORT Sort the array elements EMPTY Test for no elements VALTYPE Evaluates data type directly Code block The code block data type identifies a small piece of executable pro gram code A code block is something like a little user defined function where only a sequence of functions or assignments may appear no loops no IF ELSE END A code block may receive argument and return a value after execu tion just like a function The syntax is argument list exp list That is the argument list is optional the exp list may contain one or more expressions separated with a comma For example calling the following code block will give the string hello world as result 1 hello world The following code block require a numeric argument an returns the number passed as argument incremented nin The following code block requires two numeric arguments and re turns the sum of the two square radix nFirst nSecond SQRT nFirst SQRT nSecond But code blocks may contains more expressions and the result of the execution of the code block is the result of the last expression The following code block executes in sequence some functions and give ever hello world as a result b functionone a functionTwo b hello world To start the execution of a code block a function is used EVAL For example a code
120. a ba se di dati a cui ci si vuole connettere In mancanza di questa indicazione viene tentata la connessione con la base di dati test 1118 base di dati Descrizione Permette di specificare il nome della rela zione in cui si vogliono trasferire i dati del file DBF In mancanza di questa indi cazione viene tentato l inserimento nella relazione test EM Con questa opzione si fa in modo di can cellare il contenuto della relazione di desti nazione prima di iniziare l inserimento dei dati Richiede espressamente che sia creata la relazione di destinazione In mancanza di questa opzione la relazione deve esse re gi disponibile altrimenti l operazione fallisce Nel caso si utilizzi questa opzio ne mentre una relazione con lo stesso no me esiste gi si ottiene la cancellazione del suo contenuto prima di iniziare come se fosse stata usata al suo posto l opzione D Prima di procedere converte 1 nomi degli f attributi in modo che questi siano scritti utilizzando solo lettere minuscole Con l opzione 1 si fa in modo che il 1 contenuto degli attributi venga converti to in lettere minuscole mentre con zione u si ottiene una conversione in maiuscole Con questa opzione si pu stabilire la sosti on tuzione di alcuni nomi degli attributi della nome_vecchio nome_nuovo 5 2 SI relazione Ci pu essere particolarmente
121. acter lt gt Compare for inequity TRANSFORM Convert to formatted string Compare for earlier VALTYPE Evaluates data type directly lt Compare for earlier or same as gt Compare for later Number appearence may be affected by SETVERB FIXED gt Compare for later or same as and consequently by SETVERB DECIMALS If In line assign SETVERB FIXED is True numbers are displayed with a fixed oe day of week name decimal position The number of decimal positions is defined DAYO Extract day number by SETVERB DECIMALS For that reason the default is DESCEND Convert to complemented form SETVERB FIXED and SETVERB DECIMALS 2 that DOWO Compute day of week is no fixed decimal position but if they will be activated the default Convert to character string with the for is two decimal digits DTOC mat defined with SETVERB DATEFOR MAT Logical DOTOS nd fon The logical data type identifies Boolean values EMPTY Test for null date Logical constants are MONTH Extract month number oT True VALTYPE Evaluates data type directly oF False YEARO Extract entire year number including cen tury When editing a logical field inputs may be for True Numeric n N f F for False The numeric data type identifies real number The theoretical range is form 104 308 to 107308 but the numeric precision is guaranteed up to 16 significant digits and fo
122. acter of the character string is a digit between zero and nine otherwise it returns false 1187 F ISLOWERO ISLOWER cString gt Boolean cString is the character string to examine ISLOWER returns true T if the first character of the character string is a lowercase letter otherwise it returns false F ISPRINTERO ISPRINTER Ready ISPRINTER returns true T if LPT1 is ready otherwise it returns false F ISUPPERO ISUPPER cString is the character string to examine ISUPPER returns true T if the first character is an uppercase letter otherwise it returns false F L2BINO Long to binary L2BIN nExp cBinaryInteger is the numeric value to convert Decimal e p digits are truncated L2BIN returns four byte character string formatted as a 32 bit binary integer LASTKEYO LASTKEY LASTKEY is a keyboard function that reports the INKEY value of the last key fetched from the keyboard buffer by the INKEY function or a wait state LASTKEY retains its current value until another key is fetched from the keyboard buffer LASTRECO Last record LASTREC nRecords LENO Length LEN cString aTarget nCount is the character st
123. ailable for RUN commands MEMOTRANO Memo translate MEMOTRAN cString cReplaceHardCR cReplaceSoftCR cNewString is the character string or memo field to search is the character to replace a hard carriage return linefeed pair with If not specified the default value is a semicolon is the character to replace a soft carriage return linefeed pair with If not specified the default value is a space cString cReplaceHardCR cReplaceSoftCR MEMOTRAN returns a copy of eString with the specified carriage return linefeed pairs replaced MEMOWRITO Memo write MEMOWRIT cFile cString Success is the name of the target disk file includ cFile ing the file extension and optional path and drive designator is the character string or memo field to write to cFile cString MEMOWRIT is a memo function that writes a character string or memo field to a disk file If a path is not specified MEMOWRIT writes cFile to the current DOS directory and not the current DE FAULT directory If cFile already exists it is overwritten MEM OWRIT Y returns true T if the writing operation is successful otherwise it returns false F MEMVARBLOCKO MEMVARBLOCK cMemvarName bMemvarBlock MLCOUNTO Memo line count MLCOUNT cString nLineLength 1TabSize Wrap nLines is the c
124. arget expValue Value is the array to add a new element to is the value assigned to the new element aTarget exp Value It increases the actual length of the target array by one The newly created array element is assigned the value specified by expValue ABSO Absolute ABS nExp nPositive nExp is the numeric expression to evaluate ABS returns a number representing the absolute value of its argu ment ACLONEO Array clone ACLONE aSource gt aDuplicate 1162 aSource is the array to duplicate returns a duplicate of aSource ACOPYO Array copy ACOPY aSource aTarget Start Count 7 nTargetPos gt aTarget aSource is the array to copy elements from aTarget is the array to copy elements to is the starting element position in the nStart aSource array If not specified the default value is one is the number of elements to copy from the aSource array beginning at the nStart po nCount sition If nCount is not specified all ele ments in aSource beginning with the start ing element are copied is the starting element position in the nTargetPos aTarget array to receive elements from aSource If not specified the default value is one ACOPY is an array function that copies elements from the aSource array to the aTarget array The aTarget array must already exist and be la
125. become inactive Create screen editing masks GVADDO Get validation add GVADD cField cAdd gt T cField the field to fill with more data cAdd is the string to be added to the content of cField This function is to be used inside GETs for pre post validation when a the content of a field should be added with more data cField is returned with the same length as before to avoid troubles with current and future GETs GVDEFAULTO Get validation default GVDEFAULT GcField cDefault gt T Field the field to check and if empty correct with cFie cDefault D It is the default value to be used to replace CENTRA cField This function is to be used inside GETs for pre post validation when a field should have a default value cField is returned with the same length as before to avoid troubles with current and future GETs GVFILEDIRO Get validation file directory GVFILEDIR eWildName T is the file name taken from the current get cWildName to be used for search with DIR This function is to be used inside GETS for pre validation the cWildName is a file name with wild cards that can be searched with the DIR function after that a specific key is pressed cWildName is returned with the same length as before to avoid trou bles with current and future GETS 1219 GVFILEEXISTO ISMEMVARO
126. block is assigned to a variable and then exe cuted hello world EVAL B hello world Another example with a parameter EVAL B 1 2 Another example with two parameters nFirst nSecond SQRT nFirst SORT nSecond EVAL 2 4 20 And so on The following table shows some operations available inside nB for code blocks many functions use code blocks as argument 1159 In line assign Evaluate execute a code block for each AEVADO element in an array BCOMPILEO 2 gt a character string into a DBEVAL Evaluate execute a code block for each record in the active alias EVAL Evaluate a code block once VALTYPE Evaluates data type directly Operators Here is a list with a brief description of the operators available inside nB cStringl cString2 Substring comparison If eString1 is contained inside cString2 the result is true T nNumberl nNumber2 Modulus The result is the remainder nNumberl divided by nNuber2 Function grouping indicator nNumberl nNumber2 Multiplication nNumberl nNumber2 nNumberl nNumber2 Exponentiation nNumberl nNumber2 dDate nNumber Addition unary positive cStringl cString2 String concatenation The result is a string beginning with the content of
127. bol suggested INDEX END CODE the index end symbol suggested POSI START die pointer start symbol suggested lt CODE POINTER END CODE the pointer end symbol suggested gt New HTML file This function permits to create a new HTML file form a text file formatted to obtain a HTF file The informations required are SOURCE TEXT FILE the filename of the text source file NAME DESTINATION FILE the filename of the destination Help Text NAME File suggested HLP extention INDEX START CODE _ the index start symbol suggested INDEX END CODE the index end symbol suggested POINTER START the pointer start symbol suggested lt CODE POINTER END CODE the pointer end symbol suggested gt HTML TITLE the title for the html page Menu Macro The menu Macro helps on creating macros programs with a macro recorder a macro compiler and a macro executor Start recording This function simply starts or pause the macro recording The menu items that end with amp may be recorded by this macro recorder Save recording A recorded macro may be saved into a ASCII file that may be later modified or simply used as it is The filename is requested Erase recording While recording or when the macro recorder is paused it is pos sible to erase all previous recording with this function 1148 Edit recording While recording or when the macro
128. cAlias2 expKey2 expKey1 Set 25 nPageOffset SET SCOREBOARD ON OFF xlToggle SET MESSAGE TO Set 32 ON OFF lToggle gg Set 36 0 SET SOFTSEEK ON OFF xlToggle Set 37 Set 9 ON OFF lToggle SET MESSAGE TO nRow CE NTER CENTRE SET TYPEAHEAD TO nKeyboardSise Set 36 nRow 1244 Set 14 nKeyboardSise 1245 SET UNIQUE ON OFF xlToggle Set 10 ON OFF lToggle SET WRAP ON OFF xlToggle Set 35 ON OFF lToggle SKIP SKIP nRecords ALIAS idAlias nWorkArea idAlias nWorkArea gt dbSkip F3 STORE STORE value TO variable variable value SUM SUM 1 nExp2 TO idVarl idVar2 FOR IForCondition lt WHILE IWhileCondition NEXT nNextRecords RECORD nRecord REST ALL dbeval idVarl idVar1 nExp1 E idVar2 idVar2 nExp2 lt lForCondition IWhileCondition nNextRecords nRecord UNLOCK UNLOCK dbUnlock UNLOCK ALL dbUnlockAll USE USE dbclosearea USE xeDatabase lt gt lt gt INDEX xelndexI xcIndex2 ALIAS xcAlias EXCLUSIVE SHARED lt gt NEW READONLY VIA eDriver
129. code may be sent to functions A code block is something like a little user defined function where only a sequence of expressions functions and or assignments may appear no loops no conditional structures A code block may receive arguments and return a value after execu tion just like a function The syntax is the following where curly brackets are part of the code block argument_list exp_list That is the argument list is optional the exp list may contain one or more expressions separated with a comma For example calling the following code block will give the string hello as result E hello world The following code block requires a numeric argument and returns the number passed as argument incremented The following code block requires two numeric arguments and re turns the sum of the two square radix 1259 nFirst nSecond SQRT nFirst SORT nSecond But code blocks may contain more expressions and the result of the execution of the code block is the result of the last expression The following code block executes in sequence some functions and gives world as a result la b functionOne a functionTwo b hello world To start the execution of a code block a function is used EVAL For example a code block is assigned to a variable and then ex
130. comuni pertanto probabile che sia necessario riela borare ci che si ottiene con dbview attraverso un programma di conversione come Recode sezione 47 8 1 Tuttavia bene consi derare che nella storia dei file DBF sono state usate anche codifi che differenti dal solito IBM437 e di questo occorre tenerne conto quando ci si accorge che la conversione non funziona come ci si aspetterebbe 1117 Tabella u135 3 Alcune opzioni Opzione Descrizione Se si utilizza questa opzione le tuple ven browse gono mostrate su una sola riga per volta separando gli attributi con un simbolo il b separatore che di solito costituito dai due punti 5 7 Con questa opzione possibile specifica re il simbolo da utilizzare per separare gli attributi delle tuple che vengono visualiz delimiter x zate Il simbolo di separazione predefinito sono i due punti 5 7 In questo caso oltre a mostrare il conte nuto del file nella parte iniziale vengono e riepilogate le caratteristiche degli attributi contenuti omit Non elenca il contenuto del file ma si limi ta a dare le altre informazioni se richieste SE attraverso le opzioni opportune Mostra i nomi degli attributi cos come sono stati memorizzati Segue la descrizione di alcuni esempi dbview articoli dbf Invio Elenca il contenuto del file articoli dbf nella forma
131. containing the FOR condition cFileName Si inside the fee alias Tim bForCondition to respect The operation will be made for all records that respect the condition acFields that should be used from the active alias a code block containing the WHILE con default is all bWhileCondition dition to respect The first time it becomes a code block containing the FOR condition False the o E 6 5 peration is terminated bForCondition to respect for the data copy Will be copied pre if used means that only the first the data that makes the evaluation of this nNextRecords will be appended copied code block True if used means that that only the record a code block containing the WHILE con nRecord M e nRecord will be appended copied dition to respect for the data copy Will Rest if used means that only the remaining bWhileCondition pe 2 m 117 as i i records will be taken into consideration of this code block is True the first time it becomes False the data copying is termi This function is used to append data to the active alias using data nated means that only the first from the cFileName file or to copy data into cFileName using the nNextRecord nNextRecords will be copied active alias as the source cFileName is a delimited ASCII file R d if used means that that only the record nRecord will be copied DBISTATUSO if used means that only the rema
132. create objects the black boxes Variable name ClassName This way a variable contains is an object Please note that inside Clipper an object may be generated also from a function that is a function can return an object This way the example can be Variable name classfunction The next problem is to handle this object Instantiating an object As already stated before methods are used to handle data contained inside an object This is said to be instantiating an object Clipper permits also to handle directly apparently without methods some variables contained inside objects These are called In stance Variables So an object can be instantiated this way 1260 object exported_instance_variable new_value object method An exported instance variable may be read and or modified depend ing on the allowed access to it a method inside Clipper is some thing like a function with or without parameters if parameters are present these are usually used to modify data inside the object that normally returns a value The send symbol To instantiate an object or simply to access an exported instance vari able the symbol colon is used More about objects If this is not enough to understand objects inside Clipper the follow ing document should be read Peter M Freese o Clip An Object Oriented Extension to Clipper
133. d known problems Here is the list of known bugs and problems Comparison with floating point numbers may fail It is better to convert numbers into string before comparing them e Macros may be contained inside ASCII files or a compiled DBF In the second case when nanoBase executes the macro a work area the last available one is used so it should not be closed or the macro execution will be stopped dbcloseall will stop execution of the macro In substi tution of dbcloseall DBCLOSE should be used 1124 To simplify the macro interpretation lines such as this qqout You can t do that you can t do that will generate an error as the interpreter will read only qqout You can t do that nanoBase works good also if you have a screen configuration that permits you to show more than the usual 80 columns and 25 lines but the library used to handle the mouse is not able to work out side the 80x25 area This material appeared originally at http www geocities com SiliconValley 7737 nanobase html in 1997 2 nanoBase GNU GPL 1125 1126 Copyright Daniele Giacomini appunti2 gmail com http informaticalibera net 2 2013 11 11 nanoBase 1997 user manual DosxBase eee ested et ER DEN TU NR EK 1134 8 a S 1134 Index 1135 1136 Compositi
134. dexes is to be the controlling index nOrderNum DBSETORDER controls which of the active alias active indexes is the controlling index DBSETRELATIONO DBSETRELATION nArea cAlias bExpr cExpr gt NIL is a numeric value that specifies the work area number of the child work area cAlias is a character value that specifies the alias of the child work area is a code block that expresses the relational bExpr M expression in executable form is an optional character value that ex presses the relational expression in textual cExpr form If cExpr is omitted the DBRELA TION function returns an empty string for the relation 1173 DBSETRELATION relates the work area specified by nArea or cAlias the child work area to the current work area the parent work area Any existing relations remain active DBSKIPO DBSKIP nRecords NIL is the number of logical records to move relative to the current record A positive value means to skip forward and a neg ative value means to skip backward If nRecords is omitted a value of 1 is as sumed nRecords DBSKIP moves either forward or backward relative to the current record Attempting to skip forward beyond the last record positions the work area to LASTREC 1 and returns true T Attempting to skip backward beyond the first record positions the work ar
135. e UPDATE FROM xcAlias ON RANDOM REPLACE idFieldl gt WITH exp idField2 WITH exp SET WRAP ON OFF xlToggle _ dbUpdate cAlias bKey Random bReplacement Set _SET_WRAP ON OFF lToggle Example SKIP dbUpdate INVOICE LAST T 1 FIELD gt TOTAL1 4 gt lt gt 50 1 FIELD gt TOTAL2 INVOICE gt SUM2 SKIP 2 Records ALIAS idAlias nWorkArea USE idAlias WorkArea gt 1 dbSkip Records 05 SORT dbclosearea USE xcDatabase lt gt INDEX xeIndexl xeIndex2 SHARED NEW 79 READONLY VIA eDriver ALIAS xcAlias EXCLUSIVE dbUseArea INewArea A cDriver cDatabase cAlias Shared 4 dbset Index cIndex1 dbSet Index cIndex2 ZAP ZAP dbZap Step 6 free yourself from STD CH U Now that no command is used the standard include file STD CH is no more necessary Clipper uses STD CH automatically unless specified differently Just compile this way C gt CLIPPER TEST PRG U Enter Step 7 take control over all include files Clipper comes with so many include files CH To avoid con fusion a single STANDARD CH file containing all what is needed for the application may be prepared At least it is necessary the following Single line box define B
136. e Ctrl PgUp show top of alias Ctrl PgDn show bottom of file Ctrl Home show the first column Ctrl End show last column Edit browse This function permits you to edit the active alias with eventual relations as a table To navigate and edit the table use the following keys 1144 Enter start field editing PgUp show previous screen page PgDn show next screen page Ctrl PgUp show top of alias Ctrl PgDn show bottom of file Ctrl Home show the first column Ctrl End show last column Ctrl Enter append a new empty record Ctrl F2 copy the current record Ctrl append and paste a record aste a previously copied record over n ie a of Ctrl Y delete or recall the current record Ctrl Del delete or recall the current record When a memo field is edited Esc cancel and close the memo window Ctrl Y line delete Ctrl W save and close the memo window Replace The content of a Field of the active alias may be replaced with an expression The required data is FIELD TO REPLACE the Field name to be replaced NEW VALUE EXPRES the expression that obtain the new value SION for the selected Field the WHILE condition expression the re placement continue until this expression WHILE EXPRESSION results True The constant T is ever True and is th
137. e cuted hello world EVAL B hello world Another example with one parameter In EVAL B 1 Another example with two parameters nFirst nSecond SQRT nFirst SORT nSecond EVAL 2 4 20 And so on Step 3 understand the object programming Clipper 5 2 do not permit to create objects but it gives some good objects to use GET and TBROWSE Before starting to clean pro gramming from commands it is necessary to understand how to use well the Clipper objects Classes and methods A class defines the structure of a black box that is a data con tainer a method is an action to make on a piece of data contained inside the black box There is no way to reach the data contained inside the black box without a method The black box can be called object The methods may be seen as they where special functions which interact with a specific piece of data contained inside the object Class definition Supposing that Clipper permits to define classes unluckily only pre defined classes can be used the hypothetical syntax could be CLASS ClassName FROM ParentClass VAR Varl Var2 1 METHOD method_definition_1 method_definition_n ENDCLASS This way the class defines a group of variables and a group of method to use with these variables Object creation The presence of classes permits to
138. e 1 0 Set SET ESCAPE ON OFF IToggle SET DATE FORMAT TO cDateFormat SET EXACT ON OFF xlToggle Set SET DATEFORMAT cDateFormat Set SET EXACT ON OFF IToggle SET DECIMALS TO SET EXCLUSIVE ON OFF xlToggle Set _SET_DECIMALS 0 Set _SET_EXCLUSIVE ON IToggle 881 SET DECIMALS TO nDecimals SET FILTER TO Set SET DECIMALS nDecimals dbclearfilter SET DEFAULT TO SET FILTER TO lCondition Set DEFAULT dbsetfilter bCondition cCondition SET DEFAULT TO xcPathspec SET FIXED ON OFF xlToggle Set SET DEFAULT cPathspec Set SET FIXED ON OFF IToggle SET DELETED ON OFF xiToggle SET FUNCTION nFunctionKey TO cString Set SET DELETED ON OFF IToggle SetFunction nFunctionKey cString SET DELIMITERS ON OFF xlToggle SET INDEX TO xeIndex 1 1272 1273 ordListClear Set SET PATH cPathspec cPathspecl ordListAdd ordListAdd cIndexl SET PRINTER ON OFF xlToggle SET INTENSITY ON OFF xlToggle Set SET PRINTER ON OFF lToggle gg Set SET INTENSITY ON ORE IToggle SE SET PRINTER TO
139. e data inside a DBF file These files may be indexed with the help of index files and more DBF files may be linked with a relation to obtain some thing like a relational database DBF files DBF files are files organised in a table structure recordl record2 record3 record4 records record6 The lines of this table are records and the columns are fields Records are numbered starting from the first that is number 1 Columns are defined as fields and fields are distinguished by name and these names are saved inside the DBF file Every field column can contain only one specified kind of data with a specified dimension character originally the maximum dimension was 254 char acters minimum is 1 e numeric a numeric field that can contain also sign and deci mal values 1134 D date a field dedicated to date information L logic a filed that may contain only for True or F for False used as a boolean variable e M memo a character field with no predefined dimension not allocated directly inside the DBF but inside a DBT file au tomatically linked No other field type is available for a typical xBase DBF file To access the data contained inside a DBF file the following list of action may be followed e Open a DBF file inside the current area where these areas are something like fil
140. e default the FOR condition expression the re FOR EXPRESSION placement is made for all records that satisfy the condition The constant T is ever True and is the default Recall The records signed for deletion deleted but still there may be recalled undeleted The required data is the WHILE condition expression the WHILE EXPRESSION record recall continue until this expres sion results True The constant T is ever True and is the default the FOR condition expression the FOR EXPRESSION record recall is made for all records that satisfy the condition The constant T is ever True and is the default Delete Deletes sign for deletion a group of record depending on the required conditions The required data is the WHILE condition expression the record deletion continue until this ex pression results True The constant T is ever True and is the default the FOR condition expression the record deletion is made for all records that satisfy the condition The constant T is ever True and is the default WHILE EXPRESSION FOR EXPRESSION Pack This function eliminates definitely records previously deleted signed for deletion It may work only if the active alias was opened in exclusive mode Menu Report The menu Report contains functions for data report print In par ticular label files LBL and report file RPT may be created and
141. e delimiter characters used to delimit a GET field when SETVERB DELIMITERS is True The starting value is SETVERB WRAP SETVERB WRAP Wrap IPrevious If Wrap is True the wrapping of the highlight in MENUs should be active but this option is actually not active and all works as it is False The starting value is False SETVERBC MESSAGE SETVERB INSERT Unsert gt Previous SETVERB MESSAGE nMessageRow nPrevious If Insert is True the data editing is in INSERT mode in the other case it is in OVERWRITE mode The starting value is True SETVERBC EXIT nMessageRow is the row number where the PROMPT message line should appear on the screen This option is not supported The starting value is 0 SETVERBC MCENTER SETVERB EXIT gt Previous SETVERB MCENTER If IExit is True Up and Down key may be used as exit key when the cursor is respectively on the first or on the last GET field In the other case not The starting value is False The recommended value is False SETVERBCINTENSITY SETVERB INTENSITY Intensity If is True the display of standard and enhanced display colors are enabled In the other case only standard colors are en abled The starting val
142. e handlers e After the DBF file is opened it referenced only by the alias name that usually correspond to the original filename without ex tention Move the record pointer to the desired location Lock the current record to avoid access from other users Do some editing with the data contained inside the current record using the field names like they were variables Release the lock Move the record pointer to another desired location Lock the current record to avoid access from other users Close the alias Before you go further you have to understand that DBF file is opened using a free WORK AREA that may be associated to the concept of the file handler e The DBF file is opened with a alias name that permit to open the same DBF file more times when using different alias names e After the DBF file is opened we don t speak any more of file but alias If the work area is used from the alias myAlias speaking of work area n or of alias my Alias is the same thing Index files DBF files are organised with record number that is you can reach a specific record and not a specific information unless that you scan record by record To obtain to see a DBF file somehow logically ordered when physically it is not index files are used A index file also called INDEX BAG is a file that contains one or more indexes Indexes are rules by
143. e name of the new database file with DECOR nRecord will be used __ Datab an optional drive and directory specified Rest if used means that only the remaining as character string If specified without records inside the active alias will be used an extension dbf is assumed Sample if ExtendedDatab is a DBF file containing the structure in isks acd IRE formation of the file to create specifies the replaceable database driver This function prints labels to the console RDD to use to process the current work area cDriver is the name of the RDD spec DBLISTO ified as a character expression if True the newly created DBF file is IN opened using the next available work area DBLIST abListColumns ew making it the current work area the active 41 alias bForCondition bWhileCondition Ali if New is set to True this is the alias name nNextRecords nRecord IRest Canas to use to open the file ToPrinter cFileName Tie ihe sent io the console This function is a old database function superseded form DBCRE IToDisplay screen p ATEC that creates a database from the structure information abListColumns is an array of columns expressions to list contained inside a structure file if True prints all the records contained in side the active alias DBPACKO a code block containing the FOR condition 23 to respect Only the records contai
144. e of the RDD you wish to list nRDDType 1 Full RDD implementation nRDDType 2 Import Export only driver nRDDType RDDLISTY returns a one dimensional array of the RDD names reg istered with the application as nRDDType RDDNAMEO RDDNAME cRDDName RDDNAME returns a character string CRDDName the registered name of the active RDD in the current or specified work area RDDSETDEFAULTO RDDSETDEFAULT cNewDefaultRDD gt cPreviousDefaultRDD is a character string the name of the RDD that is to be made the new default RDD in the application cNewDefaultRDD RDDSETDEFAULT is an RDD function that sets or returns the name of the previous default RDD driver and optionally sets the current driver to the new RDD driver specified by cNewDefaultRDD READINSERTO READINSERT 11088 ICurrentMode toggles the insert mode on or off True T 7 turns insert on while false F turns insert off The default is false F or the last user selected mode in READ or MEMOEDIT IToggle READINSERT returns the current insert mode state as a logical value READMODALO READMODAL aGetList NIL is an array containing a list of Get objects aGetList G to edit READMODAL is like the READ command but takes GetList ar ray as an argument and does not reinitialize t
145. e the active alias DISPBOXCOLORO DISPBOXCOLOR 2ColorNumber cBaseColor cColor may be 1 or 2 and are the two color used to create shadowed borders 1 is usually used for the left and top line 2 is used for the right and bottom line is the starting color string The default is the actual color nColorNumber cBaseColor This function return a color string used for DISPBOXSHADOW the function that create a shadowed border around a screen window DISPBOXSHADOW DISPBOXSHADOW nTop nLeft nBottom nRight cBoxString eColor2 NIL nTop nLeft nBottom are the screen coordinate where the box is and nRight to be displayed is the box string containing the character to cBoxString use to build the box Default is a single line box cColorl is the color string to use for the left and top Mile ol the box cColor2 is the color string to use for the right an bottom side of the box This function draws a screen box like DISPBOX but allowing the variation of colors around the border to simulate a sort of shadow DIRO DIR cFileSpec Drives 7 Files i NoDirReturn gt cPathname the filename or Pathname also with wild cFileSpec cards to be searched IDrives true T means include drives letters I
146. ea to the first record and BOF returns true T DBSTRUCTO DBSTRUCT gt aStruct DBSTRUCT returns the structure of the current database file in an array whose length is equal to the number of fields in the database file Each element of the array is a subarray containing information for one field The subarrays have the following format aStruct n 1 cName aStruct n 2 cType aStruct n 3 nLength aStruct n 4 nDecimals If there is no database file in USE in the current work area DB STRUCT returns an empty array DBUNLOCKO DBUNLOCK NIL DBUNLOCK releases any record or file locks obtained by the cur rent process for the current work area DBUNLOCK is only mean ingful on a shared database in a network environment DBUNLOCKALLO DBUNLOCKALL NIL DBUNLOCKALL releases any record or file locks obtained by the current process for any work area is only meaningful on a shared database in a network environment DBUSEAREAO DBUSEAREA INewArea 4 eDriver cName xcAlias 15 gt NIL is an optional logical value A value of true T selects the lowest numbered unoc cupied work area as the current work area before the use operation If INewArea is false F or omitted the current work area is used if the work area is occupied it is closed fi
147. eader The lines contained inside HEAD are printed each time at the top of pages IF Condition END If the condition Condition is true the lines contained inside END are printed INSERT INSERT cFileName Includes the text contained into the file cFileName LEFT LEFT nLeftBorder The nLeftBorder is the number of column to be left blank as a left border LPP LPP nLinesPerPage It determinates the page length expressed in lines After printing the nLinesPerPageth line a form feed is sent NEED NEED nLinesNeeded If the available lines are less then nLinesNeeded the follwing text will be printed on the next page PA PA Jumps to a new page 1252 REM REM COMMENT comment line It adds a comment that will not be printed WHILE WHILE Condition The lines contained inside WHILE END are printed as long as Condition is true Examples It follows some example of text to be printed with the RPT func tion Examples lines are numbered Line numbers must not be part of a real RPT text files PAGE DEFINITION Margins are defined with HEAD FOOT and LEFT com mands In the following example is defined Top 2 lines Bottom 2 lines Left 10 characters The right margin is not defined as it depends on the lines
148. ecords nRecord IRest ISample nRecord if used means that that only the record gt NIL nRecord will be used IRest if used means that only the remaining pv is the name of the label file LBL that records inside the active alias will be used contains the label format definition IToPrinter if True the output is copied to printer This function searches sequentially for the first record matching the CLPT1 FOR and WHILE conditions Once a DBLOCATE has been issued if present it is the name of a ASCII file m cFile Shete the dutputis copied you can resume the search from the current record pointer position INoConsole if True the output is not sent to the console with DBCONTINUEO a code block containing the FOR condition The WHILE condition and the scope nNextRecord nRecord and bForCondition to respect for label print Only the records IRest apply only to the initial DBLOCATE and are not operational contained inside the active alias that re for any subsequent DBCONTINUE call spect the condition will be used for labels a code block containing the WHILE condi DBOLDCREATEO bWhil diti tion to respect for the label print The first WhileCondition time that the condition is False the label print terminates DBOLDCREATE cDatabase cExtendedDatabase if used means that only the first eDriver New cAlias NIL RAZOR nNextRecords will be used Record if used means that that only the record is th
149. ed and all elements after the new element are shifted down one position ALERTO ALERT cMessage nChoice is the message text displayed centered in the alert box If the message contains one or more semicolons the text after the semi colons is centered on succeeding lines in the dialog box defines a list of up to 4 possible responses to the dialog box cMessage aOptions ALERT returns a numeric value indicating which option was cho sen If the Esc key is pressed the value returned is zero The function creates a simple modal dialog The user can re spond by moving a highlight bar and pressing the Return or Space Bar keys or by pressing the key corresponding to the first letter of the option If aOptions is not supplied a single Ok option is pre sented ALIASO ALIAS 1 WorkArea cAlias nWorkArea is any work area number ALIAS returns the alias of the specified work area as a character string If nWorkArea is not specified the alias of the current work area is returned If there is no database file in USE for the specified work area ALIAS returns a null string ALLTRIMO ALLTRIM gt cTrimmedString cString is the character expression to trim ALLTRIM returns a character string with leading and trailing 1164 ASCY returns an integer numeric value in the ran
150. ed else only the other variables are saved cMemFileName Saves memory variables to a memory file MEM MENUPROMPT aoGet Col cPrompt Block gt NIL is an array of get objects where a new get aoGet is added by MENUPROMPT These gets are read only are the screen coordinates where the menu prompt will appear cPrompt is the menu prompt string is the code block to execute when the cur sor is on the current menu prompt It is usually a code block that shows a message somewhere on the screen nRow and nCol bBlock This function should substitute the PROMPT command and han dle the mouse 1222 MENUTO aoGet nPos gt nChoice aoGet array of get objects nPos starting position to be edited Like MENU TO It returns the selected menu item created with MENUPROMPT It supports the mouse MESSAGELINEO MESSAGELINE cMessage cColor gt i 2PosLeft gt NIL aMessage the message to be displayed cColor the color string the starting position where the string mes nPosTop and nPosLeft sage would appear on the screen Default values are respectively ROW and COL MESSAGELINE is a function that display a message on the screen on the selected position If cMessage is NIL the message is elimi
151. en in the current work area BOF returns false F If the current database file con tains no records BOF returns true CDOWO Character day of week CDOW dExp cDayName dExp is the date value to convert CDOW returns the name of the day of the week as a character string The first letter is uppercase and the rest of the string is low ercase For a null date value CDOW returns a null string CHRO Character CHR cChar is an ASCII code in the range of zero to nCode 255 returns a single character value whose ASCII code is speci fied by nCode CMONTHO Character month CMONTH dDate cMonth dDate is the date value to convert CMONTH returns the name of the month as a character string from a date value with the first letter uppercase and the rest of the string lowercase For a null date value returns a null string COLO Column COL nCol is screen function that returns the current column position of the cursor The value of COL changes whenever the cursor position changes on the screen 1167 COLORSELECTO DBCLEARFILTERO COLORSELECT nColorIndex NIL DBCLEARFILTER NIL is a number corresponding to the ordinal positions in the current list of color at tributes as set by SE
152. en the macro ter minates These parameters are available for nB Suppress the copyright notice It is usefull when using nB for macro interpretation Suppress the Wait Wheel if not desired It is the Wheel that appears at top left W when a macro is interpreted or other long elaborations are executed Shows a short help nB macro compilation syntax is nB m source_macro_filename destination_macro_filename With the m parameter nB compiles the ASCII source_macro_filename into destination_macro_filename 1139 Status line nB shows a status line at the top of the screen when the nB com mand prompt or the menu system is active It shows some important informations The Menu system is organised into horizontal menu vertical menu and pop up menu The horizontal menu contains selectable items organised horizon tally DBENTX 1 ADDRESS 1 4 ADDRESS NIX i Last record 7 pointer position 6 alias 5 DUI LUI DUI DUI DUI DUI Current Work Area 4 Di eleted record appearance 3 Actual default database driver 2 Macro recorder indicator 1 1 A ADDRESS NTX 1 ADDRESS Order Tag Name 10 Order number 9 Order Bag name 8 1 This is the place for the macro recorder indicator The symbol used is am
153. ence pointer Shift F3 Search for a new pattern F3 Repeat previous search Macro nB can execute run macro files There may be three kind of macro files ASCII usually with amp extention compiled usually with NB extention EXE files compiled with Clipper and linked Compiled macro files are executed faster then the ASCII source files EXE macro files are the fastest 1150 Macro statements The statements recognised from nB are very similar to Clipper with some restrictions Note that the FOR statement is not included there is no function declaration procedure calls cannot transfer variables only public variables are allowed PROCEDURE Procedures are the basic building blocks of a nB macro Procedures are visible only inside the current macro file The procedure structure is as follows PROCEDURE procedure_name statements RETURN statements ENDPROCEDURE A procedure definition begins with a PROCEDURE declaration followed with the procedure_name and ends with ENDPROCE DURE Inside the PROCEDURE ENDPROCEDURE declaration are placed the executable statements which are executed when the procedure is called Inside the PROCEDURE ENDPROCEDURE declaration the RETURN statement may appear In this case encountering this RETURN statement the procedure execution is immediately ter minated and control is passed to the statement following the call ing one The procedure defin
154. enhanced screen output border Normally unused background Normally unused This is the color used for GET fields with unselected out focus The default color string is BG B N W N N N N W N that is standard bright Cyan on Blue enhanced Black on White border Black on Black background Black on Black unselected White on Black The following table explains the use of letters inside the color string Note that the plus sign means high intensity the star means blink and that and can be allowed only to the first letter inside a couple Color Letter Monochrome Black N Space Black Blue B Underline Green G White Cyan BG White Red R White Magenta RB White Brown GR White White W White Gray N Black Bright Blue B Bright Underline Bright Green G Bright White Bright Cyan BG Bright White Bright Red R Bright White Bright Ma Bright White genta Bright GR Bright White Brown Bright White W Bright White Black U Underline Soa I Inverse Video Blank X Blank SETVERBC ALTFILE SETVERB ALTFILE cAlternateFilename Additive gt cPrevious If SETVERB ALTERNATE is True the output of the console is send also to cAlternateFilename a standard ASCII file If lAdditive is True the output is appended to the ASCII file if it already exists else it is erased first SETV
155. ent With this example the variable A contain the reference to an array with three element containing character string A 1 first element A 2 second element A 3 third element Arrays may contain also no element empty array and may be ex pressed as 9 The array element is identified by a number enclosed with square brackets following the variable name containing the reference to the array The first array element is one If an array contains arrays we obtain a multidimensional array For example 111 2 3 4515591 With this example the variable A contain the reference to bidi mensional array containing numbers A 1 1 or A 1 1 contains 1 A 1 2 or A 1 2 contains 2 A 2 1 or A 2 1 contains 3 and so on As arrays may contain mixed data it is the user who have to handle correctly the element numbers For example hello 3 4 1234 A 1 hello A 2 reference to 3 4 A 3 1234 A 2 1 or A 2 1 contains 3 1158 In line assign AADD Add dynamically an element to an array ACLONE Create a copy of an array ACOPY d element by element an array to an other ADEL Delete one element inside an array AFILL Fill all array elements with a value AINS Insert an element inside an array ARRAY Creates an array of empty elements ASCAN Scan the array elements ASI
156. er string containing the linking expression of the relation specified by nRelation If there is no RE LATION SET for nRelation DBRELATION returns a null string p DBRLOCKO DB record lock DBRLOCK Success is the record number to be locked The de RecN 7 fault is the current record 1171 is a database function that locks the record identified by or the current record DBRLOCKLISTO DBRLOCKLIST gt aRecordLocks DBRLOCKLIST returns a one dimensional array of the locked records in the active alias DBRSELECTO DB relation select DBRSELECT nRelation gt nWorkArea is the position of the desired relation in the nRelation list of current work area relations DBRSELECT returns the work area number of the relation speci fied by nRelation as an integer numeric value If there is no RELA TION SET for nRelation DBRSELECT returns zero DBRUNLOCKO DB relation unlock DBRUNLOCK mRecNo NIL is the record number to be unlocked The default is all previously locked records DBRUNLOCK is a database function that unlocks the record iden tified by nRecNo or all locked records DBSEEKO DBSEEK expKey ISoftSeek IFound is a value of any type that specifies the key expKey value associated with the des
157. er value that expresses the index cKeyExpr T key expression in textual form bKeyEspr isa code block that expresses the index key expression in executable form is an optional logical value that specifies IUni whether a unique index is to be created gue If Unique is omitted the current global SET UNIQUE setting is used DBCREATEINDEX creates an index for the active alias If the alias has active indexes they are closed DBDELETEO DBDELETE gt NIL DBDELETE marks the current record as deleted Records marked for deletion can be filtered using SET DELETED or re moved from the file using the PACK command DBEVALO DB evaluate DBEVAL bBlock bForCondition bWhileCondition nNextRecords Record Rest gt NIL is a code block to execute for each record block processed the FOR condition expressed as code bForCondition block i N e condition expressed as code bWhileCondition block P is an optional number that specifies the number of records to process starting with the current record It is the same as the NEXT clause is an optional record number to process If this argument is specified bBlock will nRecord be evaluated for the specified record This argument is the same as the RECORD clause is an optional logical value that determines IRest whether the scope of DBEVAL is all records or starting with the current
158. etting cColorString cColorString DISPOUT is a simple output function that writes the value of a single expression to the display at the current cursor position This function ignores the SET DEVICE setting output always goes to the screen DOWO Day of week DOW dDate gt dDate is a date value to convert DOW returns the day of the week as a number between zero and seven The first day of the week is one Sunday and the last day is seven Saturday If dDate is empty DOW returns zero DTOCO Date to character DTOC dDate cDate dDate is the date value to convert DTOC returns a character string representation of a date value The return value is formatted in the current date format A null date returns a string of spaces equal in length to the current date format DTOSO Date to sort DTOS dDate cDate dDate is the date value to convert 1177 DTOS returns a character string eight characters long in the form yyyymmdd When dDate is a null date CTOD DTOS returns a string of eight spaces EMPTY exp gt exp is an expression of any data type EMPTY returns true T if the expression results in an empty value otherwise it returns false F Array Character Memo Spaces
159. example to start BROWSE amp automatic browse BROWSE NB compiled macro BROWSE amp FRE batch file to start a DBF browse with the P BROWSE macro program a macro program source example for a Dos MENU amp menu NB compiled macro MENU amp MENU BAT batch file to use the MENU macro The file NBASExx6 ZIP contains also the following files source code for the version 96 06 16 1138 NB PRG the main source file for version 96 06 16 NB_REQ PRG the source file containing links to all the standard functions NB LNK link file for compilation rmake file to compile with RTLink rmake file to compile with Exospace rmake file to compile with RTLink defining RUNTIME to obtain a small nB runtime version link file to compile and link a macro rmake file to compile and link a macro NB_NRMAL RMK NB_EXOSP RMK NB_RUNTI RMK MACRO LNK MACRO RMK The file NBASExx7 ZIP contains also the following files source code for the current version NB PRG the main source file the source file containing links to all the Clipper functions the source file for standard functions the source file for other standard functions general include file that substitutes all in clude file normally used for normal Clipper
160. ff If not specified the in the MEMOEDIT window If a line default value is true T nLineLength is greater than nLineLength it is word wrapped to the next line in the MEMOLINE returns the line of text specified by nLineNumber in OEDIT window The default line length cString as a character string If the line has fewer characters than the is nRight nLeft indicated length the return value is padded with blanks If the line determines ISSUES CES oa number is greater than the total number of lines in eString MEM nTabSize sert when the user presses Tab The default i is four OLINE returns a null string If Wrap is true T and the define the display position of the cursor indicated line length breaks the line in the middle of a word that within the text buffer when MEMOEDIT word is not included as part of the return value but shows up at the nTextBufferRow is invoked nTextBufferRow begins with beginning of the next line extracted with MEMOLINEQ If Wrap is nTextBufferColumn one and nTextBufferColumn begins with false F MEMOLINE returns only the number of characters zero Default is the beginning of MEM specified by the line length The next line extracted by MEMO position of the cursor LINE begins with the character following the next hard carriage within the window Row return and all intervening characters are not processed nWindowRow and
161. fied setting Inside nB the function SET is not so easy to use as inside the Clip per environment This because nB cannot support manifest constants and a numeric specifier nSpecifier is not easy to manage Instead of you can use SETVERB SETBLINKO SETBLINK Toggle ICurrentSetting changes the meaning of the asterisk character when it is encountered in a SET COLOR string Specifying true T sets character blinking on and false F sets background intensity The default is true T Toggle SETBLINK returns the current setting as a logical value SETCANCELO SETCANCEL Toggle ICurrentSetting changes the availability of Alt C and Ctrl Break as termination keys Specifying true T allows either of these keys to ter minate an application and false F dis ables both keys The default is true T Toggle SETCANCEL returns the current setting as a logical value SETCOLORO SETCOLOR eColorString cColorString is a character string containing a list cColorString of color attribute settings for subsequent screen painting SETCURSORO SETCURSOR 1 CursorShape nCurrentSetting is a number indicating the shape of the cur sor nCursorShape 0 None nCursorShape 1 Underline nCursorShape 2 Lower half block nCurs
162. ful If the return value is less than nBytes or zero either the disk is full or another error has occurred Get environment GETENV cEnvironmentVariable cString is the name of the DOS environment vari able When specifying this argument you cEnvironmentVariable can use any combination of upper and low ercase letters GETENV is not case sen sitive GETENV returns the contents of the specified DOS environment variable as a character string If the variable cannot be found GETENV returns a null string HARDCRO Hard carriage return HARDCR cString cConvertedString is the character string or memo field to con cString vert is a memo function that replaces all soft carriage returns CHR 141 with hard carriage returns CHR 13 It is used to dis play long character strings and memo fields containing soft carriage returns with console commands HEADERO HEADER gt nBytes HEADER returns the number of bytes in the header of the current database file as an integer numeric value If no database file is in use HEADER returns a zero 0 I2BINO Integer to binary I2BIN nInteger cBinaryInteger 1183 is an integer numeric value to convert Decimal digits are truncated nInteger I2BIN returns a two byte character string containing a 16 bit bi nary
163. function that locks the current record pre venting other users from updating the record until the lock is re leased RLOCK provides a shared lock allowing other users read only access to the locked record while allowing only the current user to modify it A record lock remains until another record is locked an UNLOCK is executed the current database file is closed or an FLOCK is obtained on the current database file ROUNDO ROUND nNumber nDecimals nRounded nNumber is the numeric value to round defines the number of decimal places to nDecimals retain Specifying a negative nDecimals value rounds whole number digits ROUND is a numeric function that rounds nNumber to the number of places specified by nDecimals Specifying a zero or negative value for nDecimals allows rounding of whole numbers A negative nDecimals indicates the number of digits to the left of the decimal point to round Digits between five to nine inclusive are rounded up Digits below five are rounded down ROWO ROW gt nRow ROW returns the cursor row position as an integer numeric value The range of the return value is zero to MAXROW RTRIMO Right trim R TRIM cString cTrimString is the character string to copy without trail tri i eString ing spaces RTRIM returns a copy of cString with the trailing spaces removed If cString is a null string
164. g is the character string or memo field to search is the sequence of characters to locate is the sequence of characters with which to replace cSearch If this argument is not specified the specified instances of the search argument are replaced with a null string is the first occurrence that will be replaced If this argument is omitted the default is one is the number of occurrences to replace If this argument is not specified the default is all cString cSearch cReplace nStart nCount STRTRAN returns a new character string with the specified in stances of cSearch replaced with cReplace STUFFO STUFF cString nStart nDelete cInsert cNewString is the target character string into which cString characters are inserted and deleted is the starting position in the target string nStart 5 where the insertion deletion occurs nDelete is the number of characters to delete cInsert is the string to insert STUFF returns a copy of cString with the specified characters deleted and with cInsert inserted SUBSTRO Sub string SUBSTR cString nStart nCount cSubstring is the character string from which to extract a substring is the starting position in cString If nStart is positive it is relative to the leftmost char acter in cString If nStart is negative it is relative to the
165. g 64 Allow others to read or write cFile nMode FOPEN returns the file handle of the opened file in the range of zero to 65 535 If an error occurs FOPEN returns 1 FOUNDO FOUND Success FOUND returns true T if the last search command was suc cessful otherwise it returns false F FREADO File read FREAD nHandle cBufferVar nBytes gt nBytes is the file handle obtained from FOPEN FCREATE or predefined by DOS 1181 nHandle is the name of an existing and initialized character variable used to store data read from the specified file The length of this cBufferVar variable must be greater than or equal to nBytes cBufferVar must be passed by ref erence and therefore must be prefaced by the pass by reference operator is the number of bytes to read into the nBytes buffer FREAD tries to read nBytes of the binary file nHandle inside cBufferVar It returns the number of bytes successfully read as an integer numeric value A return value less than nBytes or zero indi cates end of file or some other read error FREADSTRO File read string FREADSTR nHandle nBytes cString is the file handle obtained from FOPEN nHandle FCREATE or predefined by DOS nBytes is the number of bytes to read beginning at the current DOS file pointer position FREAD
166. ge of zero to 255 representing the ASCII value of cExp ASCANO Array scan ASCAN aTarget expSearch Start nCount nStoppedAt aTarget is the array to scan is either a simple value to scan for or a code block If expSearch is a simple value expSearch it can be character date logical nu meric type is the starting element of the scan If this nStart argument is not specified the default start ing position is one is the number of elements to scan from the starting position If this argument is not nCount specified all elements from the starting el ement to the end of the array are scanned ASCAN returns a numeric value representing the array position of the last element scanned If expSearch is a simple value ASCAN returns the position of the first matching element or zero if a match is not found If expSearch is a code block ASCAN returns the position of the element where the block returned true T ASIZEO Array size ASIZE aTarget nLength aTarget is the array to grow or shrink is the new size of the array aTarget nLength ASIZE is an array function that changes the actual length of the aTarget array The array is shortened or lengthened to match the specified length If the array is shortened elements at the end of the array are lost If the array is lengthened new elements are added to the end of the array a
167. haracter string or memo field to cString count specifies the number of characters per line nLineLength and can range from four to 254 If not specified the default line length is 79 defines the tab size If not specified the nTabSize default value is four toggles word wrap on and off Specifying true T toggles word wrap on false IWrap F toggles it off If not specified the default value is true T MLCOUNT returns the number of lines in cString depending on the nLineLength the nTabSize and whether word wrapping is on or off 5 Memo line column to position MLCTOPOS cText nWidth nLine nCol 7 gt nPosition cText is the text string to scan nWidth is the line length formatting width nLine is the line number counting from 1 nCol is the column number counting from 0 is the number of columns between tab nTabSize stops If not specified the default is 4 is the word wrap flag If not specified the IWrap default is true T MLCTOPOS returns the byte position within cText counting from 1 MLPOSO Memo line position MLPOS eString nLineLength nLine nTabSize nPosition cString is a character string or memo field nLineLength specifies the number of characters per line nLine specifies the line number is the name of
168. he value of a single expression to the current device at the current cursor or printhead position DEVPOSO Device position DEVPOS nRow nCol gt NIL are the new row and column positions of R 1 1 nRow nCo the cursor or printhead DEVPOS is an environment function that moves the screen or printhead depending on the current DEVICE DIRECTORYO DIRECTORY cDirSpec Attributes gt aDirectory identifies the drive directory and file spec ification for the directory search Wild cards are allowed in the file specification If cDirSpec is omitted the default value is specifies inclusion of files with special attributes in the returned information cAttributes is a string containing one or more of the following characters H Include hidden files S Include system files D Include directories V Search for the DOS volume label only Normal files are always included in the search unless you specify V cDirSpec cAttributes DIRECTORY returns an array of subarrays with each subarray containing information about each file matching cDirSpec The sub array has the following structure aDirectory n 1 cName aDirectory n 2 cSize aDirectory n 3 dDate aDirectory n 4 cTime aDirectory n 5 cAttributes If no files are found matching cDirSpec or if cDirSpec is an ille gal path or file specification DIRECTORY returns an empty
169. he GetList array when it terminates The GET system is implemented using a public ar 1199 ray called GetList Each time an GET command executes it creates a Get object and adds to the currently visible GetList array The standard READ command is preprocessed into a call to READ using the GetList array as its argument READVAR gt cVarName READVAR returns the name of the variable associated with the current Get object or the variable being assigned by the current MENU TO command as an uppercase character string Record number RIGHTO RIGHT cString nCount cSubString A is the character string from which to extract cString characters nCount is the number of characters to extract RIGHT returns the rightmost n Count characters of cString If nCount is zero RIGHT returns a null string If nCount is negative or larger than the length of the character string RIGHT returns cString RLOCKO Record lock RECNO gt nRecord RLOCK ISuccess returns the current record number as an integer numeric value If the work area contains a database file with zero records RECNO returns one BOF and both return true T LASTREC returns zero If the record pointer is moved past the last record RECNO returns LASTREC 1 and EOF returns true
170. hileCondition A nNext A Rest P cbHeading lt gt lt gt IBeforeEject ISummary RESTORE RESTORE SCREEN FROM cScreen restscreen 0 0 Maxrow Maxcol cScreen RESTORE FROM RESTORE FROM xcMemFile ADDITIVE MRestore lAdditive RUN RUN xcCommandLine Run SAVE SCREEN TO SEEK SEEK expSearch SOFTSEEK dbSeek expSearch ISoftSeek SELECT SELECT xnWorkArea idAlias dbSelectArea nWorkArea eIdAlias SET Most of the SET commands are translated into the SET func tion that distinguishes different modes depending on a number As this number is difficult to handle during programming essentially because it is difficult to remember the meaning of it Clipper offers the SET CH include file that helps with manifest constants define define define define define define defin defini define define define define _ define define define define defin define define define define _ defini defin define define define _ define define define defin define SET_EXACT SET_FIXED SET_DECIMALS _DATEFORMAT SET_PATH SET_DEFAULT _EXCLUSIVE _ ET UNIQUE ET DELETED SET CANCEL SET D
171. ields cannot be modified the default value is False aButtons IReadOnly This function is made to substitute the READMODAL allowing the use of the mouse The array aButtons is made with the help of the function BUTTON RFO RF cFRMName 5ForCondition bWhileCondition 7 nNext nRecord cbHeading i BeforeEject Summary Date acExtra NIL the form FRM file to use to print the ac Sia tive alias bForCondition code block for the FOR condition bWhileCondition code block for the WHILE condition nNext see REPORT FORM nRecord see REPORT FORM Rest see REPORT FORM if true T force the print a simple IPlain way additional header in character or code cbHeading block form If a code block is sent the final result must be a character string lBeforeEject if true T force a form feed before the print Summary if true T force a summary print if false F force the print without date IDate at the top of page a character array that may be used for translating standard printed report form words and to add vertical and horizontal separations The default value of acExtra is acExtra 1 Page No acExtra acExtra 2 Subtotal acExtra 3 Subsubtotal acExtra 4 Total acExtra 5 vertical column separation axExtra 6 horizontal sepa
172. ile error FERROR nErrorCode FERROR returns the DOS error from the last file operation as an integer numeric value If there is no error FERROR returns zero nErrorCode value Meaning 0 Successful 2 File not found 3 Path not found 4 Too many files open 5 Access denied 6 Invalid handle 8 Insufficient memory 15 Invalid drive specified Attempted to write to a write protected 19 disk 21 Drive not ready 23 Data CRC error 29 Write fault 30 Read fault 32 Sharing violation 33 Lock Violation FERROR is a low level file function that indicates a DOS error after a file function is used 1179 FIELDBLOCKO FIELDBLOCK cFieldName bFieldBlock is the name of the field to which the set get cana block will refer FIELDBLOCK returns a code block that when evaluated sets as signs or gets retrieves the value of the given field If cFieldName does not exist in the current work area FIELDBLOCK returns NIL FIELDGETO FIELDGET nField ValueField is the ordinal position of the field in the nField record structure for the current work area FIELDGET returns the value of the specified field If n Field does not correspond to the position of any field in the current database file FIELDGET Y returns NIL FIELDNAMEO 7 is the name of the field specified as a char cFieldName acter string is the work area numbe
173. ill be automatically initialised to NIL MIN Compute minimum 1156 1157 Array The array data type identifies a collection of related data items that share the same name Each value in an array is referred to as an element Array elements can be of any data type except memo memo is avail able only inside database fields For example the first element can be a character string the second a number the third a date and so on Arrays can contain other arrays and code blocks as elements The variable containing the array does not contains the entire array but the reference to it A 2 2 or A 2 2 contains 4 A 1 1 is an error The following table shows all operations available inside nB for ar rays When the NIL type was described it was cleared that variables doesn t contains real data but pointer to data But this happens in a transparent way that is that when the a variable is assigned to another for example A B the variable receiving the assignment will receive a pointer to a new copy of the source data This is not the same with arrays assigning to a variable an array will assign to that variable a pointer to the same source array and not to a new copy of it If arrays are to be duplicated the ACLONE function is to be used An array constant may be expressed using curly brackets See the examples below first element second element third elem
174. in the current standard color on the bottom line of the specified region If the region scrolls down the operation is reversed If the screen region is scrolled more than one line this process is repeated SECONDS nSeconds SECONDS returns the system time as a numeric value in the form seconds hundredths The numeric value returned is the number of seconds elapsed since midnight and is based on a twenty four hour clock in a range from zero to 86399 SELECTO SELECT gt nWorkArea cAlias is the target work area alias name SELECT returns the work area of the specified alias as a integer numeric value SETO SET nSpecifier expNewSetting CurrentSetting is a numeric value that identifies the setting to be inspected or changed is an optional argument that specifies a new value for the nSpecifier The type of expNewSetting depends on nSpecifier is a logical value that indicates whether or not files are opened for some settings A value of false F means the file should be truncated A value of true T means the file should be opened in append mode In either case if the file does not exist it is created If this argument is not specified the default is append mode nSpecifier expNewSetting 1202 SET returns the current value of the speci
175. ining Rest records inside the active alias are copied Dri is the optional driver name to use to open DBISTATUS gt DBInformations the cFileName file This function is used to copy data to cFileName form the active alias DBCOPYSTRUCTO DBCOPYSTRUCT cDatabase acFields NIL is a structure DBF file that will be filled cDatabase with structure information about the active alias is an array of fieldnames that should be acFields taken into consideration This function creates a structure DBF file copying the structure of the active alias DBCOPYXSTRUCT DBCOPYXSTRUCT cExtendedDatabase NIL is a structure DBF file that will be filled with structure information about the active alias accepting extended structure infor mations cExtendedDatabase This function creates a structure DBF file copying the structure of the active alias This function accept non standard structure that is the extended structure available inside Clipper DBDELIMO 1212 This function returns the informations on the active alias in a text form DBISTRUCTUREO DBISTRUCTURE cTextStructure NIL This function returns the structure information on the active alias in a text form DBJOINO DBJOIN cAlias cDatabase acFields y bForCondition gt N L the name of
176. integer IFO 1 IF ICondition expTrue expFalse gt Value is a logical expression to be evaluated is the value a condition expression of any data type returned if Condition is true CET is the value of any date type returned if Condition is false F This argument need not be the same data type as expTrue ICondition expTrue expFalse returns the evaluation of expTrue if Condition evaluates to true T and expFalse if it evaluates to false F INDEXEXTO Index extention INDEXEXT gt cExtension INDEXEXT returns the default index file extension by determining which database driver is currently linked INDEXKEYO INDEXKEY nOrder cKeyExp is the ordinal position of the index in the list of index files opened by the last USE INDEX or SET INDEX TO com mand for the current work area A zero value specifies the controlling index with out regard to its actual position in the list nOrder INDEXKEY returns the key expression of the specified index as character string If there is no corresponding index or if no database file is open INDEXKEY returns a null string INDEXORDO Index order INDEXORD gt nOrder INDEXORD returns an integer numeric value The value returned is equal to the position of the controlling index in the list of open indexes for the curren
177. ired record is an optional logical value that specifies whether a soft seek is to be performed ISoftSeek This determines how the work area is po sitioned if the specified key value is not found If ISoftSeek is omitted the current global SET SOFTSEEK setting is used DBSEEK returns true T if the specified key value was found otherwise it returns false F DBSELECTAREAQ DBSELECTAREA nArea cAlias gt NIL is numeric value between zero and 250 inclusive that specifies the work area being selected is a character value that specifies the alias of a currently occupied work area being se lected nArea cAlias DBSELECTAREA causes the specified work area to become the current work area subsequent database operations will apply to this work area unless another work area is explicitly specified for an operation DBSETDRIVERO DBSETDRIVER eDriver cCurrentDriver 1172 is an optional character value that specifies the name of the database driver that should be used to activate and manage new work areas when no driver is explicitly specified cDriver DBSETDRIVER returns the name of the current default driver DBSETFILTERO DBSETFILTER bCondition Condition gt NIL is a code block that expresses the filter con bCondition Sie dition in executable form is a character value tha
178. ition do not permit to receive parameters from the calling statement DO PROCEDURE There is only one way to call a procedure DO PROCEDURE procedure_name When the statement DO PROCEDURE is encountered the con trol is passed to the begin of the called PROCEDURE After the PROCEDURE execution the control is returned to the statement following DO PROCEDURE The procedure call do not permit to send parameters to the pro cedure BEGIN SEQUENCE The BEGIN SEQUENCE END structure permits to define a sequence of operation that may be broken Inside nB this control structure is useful only because there is the possibility to break the execution and pass control over the end of it This way encountering BREAK means go to end BEGIN SEQUENCE statements BREAK statements END Inside nB error exception handling is not supported DO CASE This is a control structure where only the statements following a True CASE condition are executed When the DO CASE statement is encountered the following CASE statements are tested The first time that a condition re turns True the CASE s statements are executed and then control is passed over the END case That is only one CASE is taken into consideration 1151 If no condition is True the statements following OTHERWISE are executed DO CASE CASE Condition statements CASE 2 statements OTHERWISE s
179. lias is opened with an index To relate two DBF files the following list of action may be fol lowed e Open the first DBF file Open a index file for the first alias Select a particular order 1136 e Open the second DBF file Open a index file for the second alias Select a particular order Select the first alias Define a relation form the first alias and the second alias the child alias Search for a key or move the record pointer of the first alias don t care about the Child alias Lock the current record to avoid access from other users If data contained inside the Child alias should be edited usually it doesn t happen lock the current record of the Child alias Do some editing with the data contained inside the current record using the field names like they were variables Release the lock also with the Child alias if a lock was made Move the record pointer to another desired location Lock the current record to avoid access from other users Release the relation Close the Child alias Close the first alias As may be seen relations are not saved inside files but are obtained with lines of code Composition nB is composed from the following files where xx is the the version code NBASExx1 ZIP EXEs for small PCs NBASExx2 ZIP Runtime EXEs for small PCs NBASExx3 ZIP EXEs for 1286 wi
180. list ORDNUMBERO ORDNUMBER cOrderName cOrderBagName gt nOrderNo the name of the specific Order whose posi cOrderName tion in the Order List is sought cOrderBagName is the name of a disk file containing one or more Orders ORDNUMBER returns nOrderNo an integer that represents the position of the specified Order in the Order List ORDSETFOCUS ORDSETFOCUS cOrderName nOrder cOrderBagName j cPrevOrderNameInFocus is the of the selected Order a logical cOrderName ordering of a database is a number representing the position in the poner Order List of the selected Order cOrderBaeN me is the name of a disk file containing one or 5 more Orders ORDSETFOCUS is an Order management function that returns the Order Name of the previous controlling Order and optionally sets the focus to an new Order OSO OS cOsName 050 returns the operating system name as a character string OUTERRO Output error OUTERR exp list gt NIL is a list of values to display and can consist of any combination of data types including memo exp list OUTERR is identical to OUTSTD except that it writes to the standard error device rather than the standard output device Output sent to the standard error device bypasses the console and output devices as well as any DOS redirection
181. lumn position is zero PROW Printed row PROW gt nRow PROW returns an integer numeric value that represents the number of the current line sent to the printer The beginning row position is zero QOUTO QOUT exp_list gt NIL QQOUT exp_list gt NIL is a comma separated list of expressions of any data type other than array or block to display to the console If no argument is specified and QOUTY is specified car riage return linefeed pair is displayed If is specified without arguments nothing displays exp_list QOUT QQOUT are console functions They display re sults of one or more expressions to the console QOUT outputs carriage return and linefeed characters before displaying the results of exp list QQOUT displays the results of exp list at the current ROW and position When QOUT QQOUT display 1198 to the console ROW and COL are updated RATO Right at cSearch cTarget nPosition is the character string to locate is the character string to search cSearch cTarget returns the position of within cTarget as an integer numeric value starting the search from the right If cSearch is not found RAT returns zero RDDLISTO RDDLIST nRDDType aRDDList is an integer that represents the typ
182. mented ACCEPT Field Message cHeader updatedField NIL It is a prompt function that shows cMessage asking to type some thing into Field It returns the updated data or NIL if Esc was pressed The string cHeader is showed centered at the top window alSelectableItems is a parallel array of logical values one el ement for each item in acMenuItems that specify the selectable menu items Ele ments can be logical values or character strings If the element is a character string it is evaluated as a macro expression which should evaluate to a logical data type A value of false F means that the corre sponding menu item is not available and a value of true means that it is avail able By default all menu items are avail able for selection nInitialItem is the position in the acMenultems array of the item that will be highlighted when the menu is initially displayed ACHOICEO nTop nLeft nBottom nRight acMenultems alSelectableItems unitialItem x Buttons aButtons nPosition nTop nLeft nBottom nRight are the window coordinates acMsnultems is an array of character strings to display as the menu items is a parallel array of logical values one el ement for each item in acMenultems that specify the selectable menu items Ele ments can be logical values
183. n Up V LDown Left Righter or right PgUp move to previous screen page PgDn move to next screen page Ctrl PgUp move to top of table Ctrl PgDn move to bottom of table Ctrl Home move to first column Ctrl End move to last column Ctrl Enter append a new empty line delete cut the current line and save a copy into the clipboard 2 line into the table clip Ctrl insert paste the content si the clip board in the current position Enter start editing in the current position Esc terminate x any other key will be written in the cur rent position When the editing is terminated press Esc and a dialog box will ask for the name to give to the report form file Modify report This function permits you to modify a standard report form file FRM under the dBasellI standard Report form This function permits you to print a report form with the data provided by the active alias The following data is required REPORT FORM FILE NAME the label filename the WHILE condition the form printing WHILE goes on as long as this condition remain True the FOR condition only the records FOR from the active alias that satisfy the con dition are used for the report form print Create modify print text This function activates the text editor 1147 Menu HTF The menu Htf helps on
184. n move to next screen page Ctrl PgUp move to top of table Ctrl PgDn move to bottom of table Ctrl Home move to first column Ctrl End move to last column Ctrl Enter append a new empty line delete cut the current line and save a copy into the clipboard copy current line into the table clip Ctrl F2 board insert paste the content of the clip Ctrl F3 board in the current position Enter start editing in the current position Esc terminate 1 any other key will be written in the cur rent position When the editing is terminated press Esc and a dialog box will ask for the file name and the RDD xBase files DBF are not all equal this way when a new DBF file si created the RDD Replaceable Database Driver is asked The normal RDD is DBFNTX the one used by Clip per Modify DBF structure The modification of a DBF file structure is a delicate matter if it contains data In fact it is a data transfer from a source DBF file to a des tination DBF file with a different structure This way the destination DBF will be updated only for the fields with the same name of the source one The position may be different but names cannot be changed not so easily Mistakes may be dangerous so before doing it it is recom 1142 mended a backup copy of the original DBF file Open DBF When a DBF file is
185. nd assigned NIL ASORTO Array sort ASORT aTarget Start Count bOrder gt aTarget aTarget is the array to sort 1165 is the first element of the sort If not speci fied the default starting position is one is the number of elements to sort If not specified all elements in the array begin ning with the starting element are sorted is an optional code block used to determine sorting order If not specified the default order is ascending nStart nCount bOrder ASORT is an array function that sorts all or part of an array con taining elements of a single data type Data types that can be sorted include character date logical and numeric If the bOrder argu ment is not specified the default order is ascending Each time the block is evaluated two elements from the target array are passed as block parameters The block must return true if the elements are in sorted order ATO cSearch cTarget gt nPosition is the character substring for which to search is the character string to search cSearch cTarget returns the position of the first instance of cSearch within cTarget as an integer numeric value If cSearch is not found AT returns zero is a character function used to determine the position of the first occurrence of a character substring within another string ATAILO
186. nd fields 1251 ir 1251 Examples corsa 1253 HOW can Li iii iaia 1254 The Source supina a CDU X ERE es 1255 1133 1134 1137 HOW tO USO 1B 1139 Status line 1140 Tihe dot i eio rer eH Or E eam oral amass 1140 The menu System iret D ave ES 1140 The texteditorJOO 1149 The help text file Riano 1150 Macross ital esi 1150 Data types siriani RENDER D SOR 1154 1160 1161 Code Blocks 1162 Standard functions cederet ra Roe ee 1162 DB FUNCHONS coss ree ORO Rome oes eee ee 1208 Normal command substitution 1237 nB command substitution functions 1247 RPT the nB print function E EE UC PEE 1251 vere exc aria 1254 The source files iraniano 1255 nB nano Base n nano 10 9 very little is a little Dos xBase written in Clipper 5 2 that can help to access DBF file created with different standards nB is a dot command interpreter a menu driven xBase a xBase program interpreter Dos xBase This section is a brief description of the functionality of a typical Dos xBase The first purpose of a xBase program is to handl
187. ned in side the active alias that respect the condi DBPACK gt NIL tion will be used for list a code block containing WHILE condi This function eliminates definitively the active alias records previ bWhileCondition tion to respect The first time that the con ously signed for deletion It works only if the active alias is opened dition is False the list terminates in exclusive mode NextR d if used means that only the first nNextRecords will be used DBSDFO nRecord if used means that that only the record nRecord will be used __ IRest if used e that only the pee DBSDF cFileName acFields records inside the active alias will be used m 5 if True the output is copied to printer bForCondition bWhileCondition IToPrinter LPT1 nNextRecords Record E Rest NIL if present it is the of a ASCII file cFileName where the output is copied if True the function works copying data to ICopyTo cFileName from the active alias if False i the function work appending data from This function prints a list of records to the console FileName to the active Alida 1 the filename containing data to to DBLOCATEO cFileName the active alias or to use as the target of the data copy from the active alias Lane meo array of fieldnames indicating the fields of i E T 5 pide only acFields the active
188. number moves the pointer backward in the file defines the starting location of the file pointer before FSEEK is executed The nOrigin default value is zero representing the be ginning of file If nOrigin is the end of file nOffset must be zero or negative nOrigin Seek from beginning of file nOrigin Seek from the current pointer position nOrigin Seek from end of file 1182 FSEEK returns the new position of the file pointer relative to the beginning of file position 0 as an integer numeric value This value is without regard to the original position of the file pointer FSEEK is a low level file function that moves the file pointer forward or backward in an open binary file without actually reading the contents of the specified file The beginning position and offset are specified as function arguments and the new file position is returned FWRITEO File write FWRITE nHandle cBuffer Bytes nBytesWritten is the file handle obtained from FOPEN FCREATE or predefined by DOS cBuffer is the character string to write to the speci fied file indicates the number of bytes to write be ginning at the current file pointer position If omitted the entire content of cBuffer is written nHandle nBytes FWRITE returns the number of bytes written as an integer numeric value If the value returned is equal to nBytes the operation was success
189. o parts the head and groups the columns The first part head and groups requires the folliwing informa tions 1146 PAGE WIDTH the page width in characters LINES PER PAGE the usable lines per page LEFT MARGIN the left margin in characters DOUBLE SPACED double spaced print yes or no PAGE EJECT BEFORE form feed before print yes or no PRINT PS PAGE EJECT AFTER form feed after print yes or no PRINT PLAIN PAGE plain page yes or no the page header max 4 lines the sepa PAGE HEADER ration between one line and the other is obtained writing a semicolon GROUP HEADER the group title the group expression when it changes GROUP EXPRESSION the group changes SUMMARY REPORT only totals and no columns yes or no ONLY PAGE EJECT AFTER form feed when the group changes yes GROUP or no SUB GROUP HEADER sub group title SUB GROUP EXPRES SION The second part columns requires the following informations structured in table form the sub group expression column head description it can contain COLUMN HEADER 4 lines separated with a semicolon CONTENT the column expression WIDTH the column width DEC the decimal length for numeric columns totals to be calculated yes or no usefull TOTALS only for numeric columns To navigate and to edit the table use the following keys move the cursor one position up dow
190. odal GetList GetList READ SAVE ReadModal GetList RECALL RECALL dbRecall RECALL FOR ForCondition WHILE IWhileCondition NEXT nNextRecords lt gt lt RECORD nRecord REST ALL dbeval dbRecall lWhileCondition lt gt nNextRecords nRecord IRest REINDEX REINDEX EVAL lEvalCondition EVERY nRecords ordCondSet bEvalCondition Records ordListRebuild RENAME RENAME xcOldFile TO xcNewFile frename cOldFile cNewFile REPLACE REPLACE idFieldl WITH expl idField2 WITH exp2 lt gt lt FOR ForCondition WHILE WhileCondition NEXT nNextRecords 45 lt RECORD nRecord REST ALL dbeval idFieldl expl idField2 exp2 lt gt lForCondition IWhileCondition nNextRecords lt gt nRecord IRest REPLACE idFieldl WITH expl idFieldl expl 1241 RESTORE RESTORE SCREEN FROM cScreen SET DECIMALS TO restscreen 0 0 Maxrow Maxcol Set 3 0 SAVE SAVE SCREEN cScreen SET DECIMALS TO nDecimals cScreen savescreen 0 0 maxrow maxcol Set 3 nDecimals SEEK SET DEFAULT TO SEEK expSearch SOFTSEEK Set 7 dbSeek expSearch
191. of a text MEMOREAD Read form a disk text file MEMOTRAN Replace soft and hard carriage returns MEMOWRIT Write to disk text file MLCOUNT Count lines MLPOS Compute position Date The date data type is used to represent calendar dates Supported dates are from 0100 01 01 to 2999 12 31 and null or blank date The appearance date is controlled from SETVERB DATEFORMAT The default is dd mm yyyy and it easily changed for example with SETVERB DATEFORMAT MM DD YYYY to the US stan dard There is no way to represent date constants these must be replaced with the CTOD function For example if the date 11 11 1995 is to be written the right way is CTOD 11 11 1995 The character string 11 11 1995 must respect the date format de fined as before explained The function CTOD will accept only valid dates and null dates A null date is ever less than any other valid date The following table shows all operations available inside nB for date data types These operations act on one or more date expressions and the result is not necessarily a character data type 1155 Add a number of days to a date ROUND Round up or down Subtract days to date SQRT Compute square root Compare for equity STR Convert to char
192. on The dot line content may be passed to the keyboard buffer DTEMONTHO Date of month DTEMONTH nMonth cLanguage cMonth nMonth cLanguage the month number the language name This function translates the nMonth number into the month name translated using the cLanguage language DTEWEEKO Date of week DTEWEEK nWeek cLanguage cWeek is the week number 1 is Sunday 7 is Sat nWeek urday to be translated into text is the language name into which the week must be expressed At the moment it works cLanguage only for Italian so cLanguage only contain ITALIANO This function translates the week number into the week name trans lated using the cLanguage language Execute cFileMacro Executes the macro file cFileName The extention must be speci fied cFileMacro may be the name of a compiled macro or a text macro file 1218 Var get Var is in fact sent to the GET func tion using a code block cGetPicture is the get picture to use for Var cColorString is the color string to use for the get is a code block that will be evaluated be bPreExpression fore the get object will became active It must result True to obtain that the get ob ject became active is a code block that will be evaluated after bValid the get object is edited It must result True to obtain that the get object may
193. on sarrioa OK rea 1137 HOW OUSE 1139 Status linie sd a ri 1140 silice rai 1140 The menusystem 1140 Men Pile ei CER 1141 Men Edit eap 1144 Menu Report sissi ina 1145 Men i RR IEEE 1148 Men Macro iii 1148 Men 1149 Men eL 1149 Thetext editor DOC a 1149 1150 1150 Macto Statements vc ek CES od edv e Ru aee terae 1151 Variable declaratione Rr 1152 Macro structure os aL 1152 Macro comments irrita 1133 Macro long lines split 1153 The Macro TECOrer o ei 1133 Data ty POS docente obere Met HH 1154 Character Fede epe 1154 MEMO om pco RET m RR PRORA IRR D ped qd 1135 Dale 1135 ERE 1156 Logical A 1157 NIE sicilia p Na ert 1157 Pur 1158 Code scs es emer 1159 OPErALOLS tcv e telo prelatus 1160 Deliimitets Cee eae 1161 Code 1162 Standard Ene Bais wes eese 1162 1162 ABSO ese vite eroi es tace 1162 ACE ONE CHE 1162 rara ara 1163 eet es EUR b UR ERN ENSIS 1163 A
194. opened it becomes a alias a logical file placed inside a work area The same DBF file may be opened inside different areas with different alias names The required information to open the file are FILENAME the physical file name the alias name If not assigned it be ALIAS comes automatically the same of FILE NAME without extention the Replaceable Database Driver to use to access to this file a logical value TRUE means that the SHARED file will be accessible to other users FALSE means use exclusive a logical value TRUE means that the file will be only readable and no modi RDD READ ONLY fication will be allowed FALSE means that no restriction on editing will be made File NTX Contains a pop up menu for physical indexes operations New NTX new tag If the active area is used we have an active alias In this case a index may be created The index is a way to see the active alias ordered without changing the physical position of records There are two words to understand ORDER and INDEX BAG The index bag is the file that contains the information on the record ordering the order is the rule followed to order the records A index bag may contains one or more orders depending on the Replaceable Database Driver in use Typical NTX file are index bag containing only one order Depending on the RDD in use the following field may be filled INDEX FIL
195. or character strings If the element is a character string alSelectableltems itis evaluated as a macro expression which should evaluate to a logical data type A value of false F means that the corre sponding menu item is not available and a value of true T means that it is avail able By default all menu items are avail able for selection is the position in the acMenultems array nlnitialItem of the item that will be highlighted when the menu is initially displayed if True means that default buttons will ap IButtons pear aButtons is an array of buttons aButtons n 1 the nth button row position aButtons n 2 N the nth button column position aButtons n 3 the nth button text aButtons n 4 B the nth button code block returns the numeric position in the array of the menu item selected If no choice is made ACHOICE returns zero ACHOICEWINDOW alSelectableItems 2 ACHOICEWINDOW acMenultems Description nTop nLeft nBottom nRight unitialItem gt nPosition is an array of character strings to display as acMenultems the menu items em is a header to be shown at the top of win cDescription dow nTop nLeft nBottom are the window coordinates nRight 1208 ACHOICEWINDOW calls ACHOICE with a window border around ACHOICE screen area ALERTBOXO
196. orShape 3 Full block nCursorShape 4 Upper half block nCursorShape SETCURSOR returns the current cursor shape as a numeric value SETKEYO SETKEY nInkeyCode bAction gt bCurrentAction nInkeyCode is the INKEYO value of the key to be asso ciated or queried specifies a code block that is automati bAction cally executed whenever the specified key is pressed during a wait state SETKEY returns the action block currently associated with the specified key or NIL if the specified key is not currently associated with a block 1203 SETMODEO SETMODE nRows nCols ISuccess is the number of rows in the desired display nRows mode is the number of columns in the desired dis nCols play mode SETMODE is an environment function that attempts to change the mode of the display hardware to match the number of rows and columns specified The change in screen size is reflected in the val ues returned by MAXROW and Set position SETPOS nRow nCol gt NIL define the new screen position of the cur sor These values may range from 0 0 to MAXROW 0 nRow nCol SETPOS is an environment function that moves the cursor to a new position on the screen After the cursor is positioned ROW COL are updated accordingly SETPRCQ Set printer row column
197. ork area If the current work area has field with the specified name FIELDPOS returns zero FIELDPUTO FIELDPUT nField expAssign ValueAssigned is the ordinal position of the field in the nField current database file is the value to assign to the given field The expAssign data type of this expression must match the data type of the designated field variable FIELDPUT is a database function that assigns expAssign to the field at ordinal position nField in the current work area This func tion allows you to set the value of a field using its position within the database file structure rather than its field name FIELDWBLOCKO Field work area block FIELDWBLOCK cFieldName nWorkArea gt bFieldWBlock 1180 FLOCK tries to lock the active alias and returns true T if it succeeds otherwise it returns false File open cFile nHandle is the name of the file to open including the path if there is one is the requested DOS open mode indicating how the opened file is to be accessed The open mode is composed of the sum of two elements the Open mode and the Sharing mode Open mode 0 Open for reading default 1 Open for writing 2 Open for reading or writing Sharing mode 0 Compatibility mode default 16 Exclusive use 32 Prevent others from writing 48 Prevent others from readin
198. ox od e edere S etu d 1211 DBCLOSEQ nari etu edax vue RE ER repa 1211 DBCONTINUB isa ARAN 1212 DBEORYI aaa dea 1212 DBCOPYSTRUGI cues uin vo E ERE CH Sak ES 1212 DBCOPYXSTRUCTI iii 1212 DBDELIMI cumino 1212 DBISTATUS Aa e ea teres 1213 52 M YE EE TS ed hens 1213 DBJIOIN ilaele 1213 DBLABELFORM 1214 ant 1214 ea rane 1214 DBOLDEREATE sro ria 1215 DBPACK iui Seeds wees 1215 DBSDFOQ 1215 DBSORTO da 1216 DBTOTALI cruel au 1216 DBUPDATE ile 1216 DBZAP sica ana e s 1217 DISPBOXCOLOR 1217 DISPBOXSHADOW 1217 DIRO ai 1217 T 1218 1131 DTEMONTH 4 1218 DTEWEEK 2 1218 MU REIR E E 1218 GLIO 1219 GVADDO N 1219 GVDEFAULT 1 2 0 4 1219 GVFILEDIR 2 22 1219 GVFILEEXIST 1219 GVFILEEXTENTION 1220 eer eode ete eater de Hg ee es 1220 A ED Ea 1220 ISFILEQ i 1220 TS WIL DO iano 1220 ISMEMVAR
199. p Blank means that the macro recorder is OFF amp blinking means that the macro recorder is ON amp fixed means that the macro recorder is PAUSED 2 The name of the default database driver It is not necessarily the database driver for the active alias it is only the database driver that will be used for the next open create operation 3 An asterisk at this position indicates that SET DELETED is OFF This means that deleted records are not filtered When a BLANK is in this place SET DELETED is ON so that deleted records are filtered 4 The active work area number that is the area of the active alias 5 The active alias name Note that the alias name is not necessarily equal to the DBF file name 6 The actual record pointer position for the active alias 7 The number of records contained inside the active alias 8 The Order Bag name that is the index file name 9 The order number 10 The order tag name When DBFNTX database driver is used it correspond to the Order Bag name The dot line Starting nB without parameters the dot line appears This is the place where commands in form of functions may be written and ex ecuted like a old xBase The functions written inside the command line that don t result in an error are saved inside a history list This history list may be recalled with F2 and then the selected history line may be reused eventually edited Key up down may
200. pt teo Hee obi De 1271 SET uet dadini 1271 SKIP EDT 1276 SORT lalla 1276 STORE ii QURE Non un n 1276 ORE TEE 1276 TOTAL ON 1276 UNLOCK Licia rima na 1276 UPDATE FROM 5 pcr ree reote amo 1276 USE iaia bee pono OU FON Ee i 1277 ZAP iso iran 1277 Step 6 free yourself from STD CH U 1277 Step 7 take control over all include files 1277 Clipper 5 2 as the xBase tradition imposes is not an ordered clear simple programming language The question is which is the right way to write a Clipper program If the intention is not to make a xBase program but a Clipper program maybe it can be decided that it is better to use Clipper without commands Step 1 try to compile with the P parameter Supposing to compile the file TEST PRG this way C gt CLIPPER TEST PRG P Enter It generates a preprocessed output file test PPO that is a source file without comments where commands are translated into real Clipper instructions That is all the COMMAND substitution are executed and translation is sent to the file It may be difficult to read this file the first time Step 2 understand well the use of code blocks The code block is a small piece of executable program code that can be stored inside a variable or can be used as a literal constant The good of it is that pieces of
201. ptional driver name to use to open the cFileName file This function is used to append data to the active alias using data from the cFileName file that in this case is a DBF file DBCLOSEO DBCLOSE NIL It is a substitution function of DBCLOSEALL to use inside com piled macros as a true DBCLOSEALL will close the macro file too 1211 DBCONTINUEO DBDELIM CopyTo cFileName Delimiter acFields BForCondition bWhileCondition PECONTINURAE TENI nNextRecords Record gt NIL This function resumes a pending DBLOCATE if True the function work copying data to DBCOPYO ICopyTo cFileName from the active alias if False the function work appending data from cFileName to the active alias XU the filename containing data to append to oer cene s e cFileName the active alias or to use as the target of the bForCondition bWhileCondition data copy from the active alias nNextRecords e the delimiter string or character used to Record separate fields inside cFileName Rest array of fieldnames indicating the fields of cDriver gt NIL acFields the active alias that should be taken into consideration default is all the target filename for data contained a code block
202. r nanoBase are made with a reduced set of the Clipper syntax The statements recognised from nanoBase are PROCEDURE statements RETURN statements ENDPROCEDURE DO PROCEDURE procedure_name BEGIN SEQUENCE statements BREAK statements END DO CASE CASE statements CASE 2 statements OTHERWISE statements END WHILE Condition statements EXIT statements Loop statements END IF statements ELSE statements END 1122 the FOR loop is not available too difficult to implement there may be no user defined functions code blocks may be cre ated instead procedure calls cannot transfer variables there are only public global variables Beside these limitations there are many added functions to the stan dard language that make the programming easier All you need is inside NB EXE the utility to handle manually the data the macro compiler the macro executor The report system Figure u136 4 The report menu Create a label fil e 4 gt 1 rzor t Enter nanoBase can handle label LBL and form files in the format Labels and forms may be created and edited in side nanoBase Beside these old report system there is another way to make a little bit
203. r processes To insure data integrity issue DBCOMMIT before an UNLOCK operation DBCOMMITALLO DBCOMMITALL gt NIL DBCOMMITALL causes all pending updates to all work areas to be written to disk It is equivalent to calling DBCOMMIT for every occupied work area DBCREATE DBCREATE cDatabase aStruct eDriver NIL is the name of the new database file with an optional drive and directory specified as a character string If specified without an extension dbf is assumed cDatabase 1169 is an array that contains the structure of cDatabase as a series of subarrays one per field Each subarray contains the definition of each field s attributes and has the fol aStruct lowing structure aStruct n 1 cName aStruct n 2 cType aStruct n 3 nLength aStruct n 4 nDecimals specifies the replaceable database driver RDD to use to process the current work cDriver area cDriver is name of the RDD speci fied as a character expression is a database function that creates a database file from an array containing the structure of the file DBCREATEINDEXO DBCREATEINDEX cIndexName cKeyExpr bKeyExpr Unique gt NIL is a character value that specifies the file cIndexName name of the index file order bag to be cre ated is a charact
204. r where the field re nWorkArea sides specified as numeric value FIELDWBLOCK returns a code block that when evaluated sets assigns or gets retrieves the value of cFieldName in the work area designated by nWorkArea If cFieldName does not exist in the specified work area FIELDWBLOCK returns NIL FILEO FILE cFilespec gt is in the current default directory and path It is a standard file specification that can include the wildcard characters and as well as a drive and path reference cFilespec FILE returns true T if there is a match for any file matching the cFilespec pattern otherwise it returns false F FLOCKO File lock FIELDNAME nPosition cFieldName FLOCK gt Success is the position of a field in the database file structure nPosition FIELDNAME returns the name of the specified field as a character string If nPosition does not correspond to an existing field in the current database file or if no database file is open in the current work area FIELDNAMEQ returns a null string FIELDPOSQ Field position FIELDPOS cFieldName nFieldPos is the name of a field in the current or spec cFieldName ified work area FIELDPOS returns the position of the specified field within the list of fields associated with the current or specified w
205. ration no separation This function does the same work of REPORT FORM __Report Form or dbReportForm but it prints where qout and qqout print RPTO RPT cText NIL This function prints the text contained into cText using print com mands This function accepts other parameters here not described as they are not to be used for macro purpose The printing is made using QOUT and this way it is sensible to the alter nate file definition RPTMANYO RPTMANY cText bWhileCondition bForCondition NIL 1224 cText is the text to be printed bWhileCondition is a code pioak for a WHILE condition to respect for the records to print is a code block for a FOR condition to re spect for the records to print bForCondition This function prints the text contained into cText many times one for every record contained into the active alias RPTTRANSLATEO RPTTRANSLATE cText cTranslatedText This function translates once replacing variables with mem vars or Fields RUNO RUN cCommand gt NIL This function start execution of cCommand in a DOS session It works only if there is enough available memory SAY nTop nLeft Expr eSayPicture cColorString gt NIL define the starting position on the screen where the Expr should be displayed is
206. record all records to the end of file 1170 DBEVAL is a database function that evaluates a single block for each record within the active alias DBFILTERO DBFILTER BFILTER returns the filter condition defined in the current work area as a character string If no FILTER has been SET DBFILTER returns a null string DBGOBOTTOMO NIL DBGOBOTTOM moves to last logical record in the active alias DBGOTO0 DBGOTO nRecordNumber NIL is a numeric value that specifies the record number of the desired record DBGOTO moves to the record whose record number is equal to nRecordNumber If no such record exists the work area is posi tioned to LASTREC 1 and both EOF and BOF return true CD DBGOTOP NIL DBGOTOP moves to the first logical record in the current work area DBRECALLO DBRECALL NIL DBRECALL causes the current record to be reinstated if it is marked for deletion DBREINDEXO DBREINDEX gt NIL DBREINDEX rebuilds all active indexes associated with the active alias DBRELATIONO DBRELATION nRelation gt cLinkExp is the position of the desired relation in the list of active alias relations nRelation DBRELATION returns a charact
207. reen Print as it is It prints on the output peripheral the content of the text as it is Print with RPT once It prints on the output peripheral the content of the text only once replacing possible text variables Print with RPT std It prints on the output peripheral the content of the text repeating this print for every record contained inside the archive alias Exit Terminates the use of DOC the text document editing print function The text editor DOCO The function Doc activates a simple text editor usefull to build some simple reports Inside this function a menu is available and is activated pressing Alt M F10 The Doc menu is part of the nB menu system DOC may handle text files of a teorical maximum of 64K 1149 DOC may be particularly useful to create formatted text with vari ables identified by CHR 174 and CHR 175 delimiters when an active alias exists 2 gives a list of insertable fields Esc Exit DOC Call the help F2 Field list up Ctrl E Line up down Ctrl X Line down left Ctrl 5 Character left right Ctrl D Character right Ctrl right Ctrl A Word left Ctrl left Ctrl F Word right Home Line start End Line end Ctrl Home Top window Ctrl End Bottom window PgUp Previous window PgDn Next window Ctrl PgUp Document start Ctrl
208. rge enough to hold the copied elements ADELO Array delete ADEL aTarget nPosition aTarget aTarget is the array to delete an element from is the position of the target array element nPosition 8 y to delete is an array function that deletes an element from an array The contents of the specified array element is lost and all elements from that position to the end of the array are shifted up one element The last element in the array becomes NIL AEVALO Array evaluation AEVAL aArray bBlock Start Count gt aArray aArray is the array to be evaluated is a code block to execute for each element bBlock encountered is the starting element If not specified the nStart default is element is the number of elements to process from nCount nStart If not specified the default is all elements to the end of the array AEVAL is an array function that evaluates a code block once for each element of an array passing the element value and the element index as block parameters The return value of the block is ignored All elements in aArray are processed unless either the nStart or the nCount argument is specified AFILLO Array fill AFILL aTarget expValue Start Count gt aTarget 1163 aTarget is the array to fill is the value to place in each array element It can be
209. rightmost character in the cString is the number of characters to extract If omitted the substring begins at nStart and continues to the end of the string If nCount is greater than the number of char acters from nStart to the end of cString the extra is ignored cString nStart nCount SUBSTR is a character function that extracts a substring from an 1205 other character string or memo field cTimeString TIME returns the system time as a character string in the form hh mm ss hh is hours in 24 hour format mm is minutes and ss is seconds TIME is a time function that displays the system time on the screen or prints it on a report TONE nFrequency nDuration gt NIL is a positive numeric value indicating the frequency of the tone to sound is a positive numeric value indicating the duration of the tone measured in incre nDuration ments of 1 18 of a second For example an nDuration value of 18 represents one second For both arguments noninteger values are truncated not rounded to their integer portion TRANSFORMO TRANSFORM exp cSayPicture gt cFormatString is the value to format This expression can exp be any valid data type except array code block and NIL is a string of picture and template char acters that describes the format of the re turned haracter string
210. ring and returns the code block bBlock BUTTON aButtons bAction NIL eText eColor the array of buttons to be increased with a new button array is the row and column starting position for the button string cText is the text that make up the button is the color string is the code block associated to the button aButtons nRow and nCol cColor bAction This function adds to aButtons a new button array Please note that the button array added is compatible only with the READ function and not the other function using array of buttons the others do not have a color string COLORARRAYO COLORARRAY cColor aColors a color string to be translated into a color array cColors This function transform a color string into a color array The array has as many elements as the colors contained inside cColor string COORDINATEO COORDINATE CaTop enLeft nBottom nRight cVertical NIL nTop nLeft nBottom are the starting position of a window that is and nRight to be differently aligned 1210 determinates the horizontal alignment L all left 1 middle left center c center R all right r middle right determinate the vertical alignment T top t up C center c center B bottom b down cHoro
211. ring to count is the array to count cString aTarget LEN returns the length of a character string or the number of ele ments in an array as an integer numeric value LOGO LOG nExp nNaturalLog is numeric value greater than zero to con i p vert to its natural logarithm returns the natural logarithm as a numeric value If nExp is less than or equal to zero LOG returns a numeric overflow dis played as a row of asterisks LOWERO LOWER cString gt cLowerString is a character string to convert to lower case cString LOWER returns a copy of cString with all alphabetic characters converted to lowercase LTRIMO Left trim LTRIM cString cTrimString is the character string to copy without lead cStrin 8 ing spaces LTRIM returns a copy of cString with the leading spaces removed Last update LUPDATE dModification returns the date of last change to the open database file in the current work area MAXO LASTREC returns the number of physical records in the active alias as an integer numeric value LEFTO LEFT cString nCount cSubString is a character string from which to extract cString characters nCount is the number of characters to extract LEFT
212. rmatting a numeric value for display is guaranteed up to a length of 32 30 digits a sign and a decimal The following table shows all operations available inside nB for log ical data types These operations act on one or more logical expres sions and the result is not necessarily a logical data type AND And point That is numbers longer than 32 bytes may be displayed as OR o asterisks and digits other then most 16 significant ones are displayed NOT ont Negate as zeroes Compare for equity Numeric constants are written without delimiters The following are 1 lt gt or Compare for inequity valid constant numbers 12345 Comparing two logical values False F is always less than True 12345 678 156 NIL 1256 789 NIL is not properly a data type it represent the value of an unini 789 tialised variable If a numeric constant is delimited like character strings it becomes Inside nB like what it happens inside Clipper variables are not a character string declared with the data type that they will contain This means that a variable can contain any kind of data In fact nB variables are The following table sh Il ti ilable inside nB fi e following table shows all operations available inside for nu pointer to duaaud a nothing is NIL meric data types These operations act on one or more numeric ex
213. rst is an optional character value If present it specifies the name of the database driver which will service the work area If cDriver is omitted the current default driver is used 1174 INewArea cDriver specifies the name of the database dbf file to be opened is an optional character value If present it specifies the alias to be associated with the work area The alias must constitute a valid identifier A valid xcAlias may be any le gal identifier i e it must begin with an alphabetic character and may contain nu meric or alphabetic characters and the un derscore If xcAlias is omitted a default alias is constructed from cName is an optional logical value If present it specifies whether the database dbf file should be accessible to other processes on a network A value of true T speci fies that other processes should be allowed access a value of false F specifies that the current process is to have exclusive access If IShared is omitted the current global SET EXCLUSIVE setting deter mines whether shared access is allowed is an optional logical value that specifies whether updates to the work area are pro hibited A value of true T prohibits updates a value of false F permits updates value of true T also permits read only access to the specified database dbf file If IReadonly is omit ted the default value is false
214. s in length If the workstation identification was never set or the application is not operating under the IBM PC Network it returns a null string NEXTKEYO NEXTKEY nInkeyCode NEXTKEY returns an integer numeric value ranging from 39 to 386 If the keyboard buffer is empty NEXTKEY returns zero If SET TYPEAHEAD is zero NEXTKEY always returns zero is like the INKEY function but differs in one fun damental respect INKEY removes the pending key from the key board buffer and updates LASTKEY with the value of the key NEXTKEY by contrast reads but does not remove the key from the keyboard buffer and does not update LASTKEY NOSNOW gt NIL 1194 is a logical value that toggles the current state of snow suppression A value of true T enables the snow suppression while a value of false F disables snow suppression Toggle NOSNOW is used to suppress snow on old CGA monitors ORDBAGEXT cBagExt returns a character expression that is the default Or der Bag extension of the current work area cBagExt is determined by the RDD active in the current work area ORDBAGNAMEO ORDBAGNAME nOrder cOrderName cOrderBagName is an integer that identifies the position in the Order List of the target Order whose Order
215. s you easily edit a long character field memo defin ing automatically a simple window and providing a simple help MEMPUBLICO MEMPUBLIC cMemvarName acMemvarNames gt NIL is the name of the PUBLIC variable to cre cMemvarName ate max 10 characters is an array of PUBLIC variable names to acMemvarNames create max 10 characters Creates a PUBLIC variables or a group of variables MEMRELEASE MEMRELEASE cMemvarName acMemvarNames NIL is the name of the PUBLIC variable to be cMemvarName released is an array of PUBLIC variable names to acMemvarNames be released This function releases a previously created PUBLIC variables or a group of variables MEMRESTOREO MEMRESTORE cMemFileName Additive gt NIL cMemFileName the memory file MEM to load from disk if True causes memory variables loaded from the memory file to be added to the ex lAdditive isting pool of memory variables If False the existing memory variables are automat ically released Retrieve memory variables form a memory file MEMSAVEO MEMSAVE cMemFileName cSkeleton Like gt NIL the memory file MEM where public variables should be saved the skeleton mask for defining a group cSkeleton of variables Wildcard characters may be used and 2 if True the variables grouped with ILike cSkeleton are sav
216. t examples AMERICAN mm dd yyyy ANSI yyyy mm dd BRITISH dd mm yyyy FRENCH dd mm yyyy GERMAN dd mm yyyy ITALIAN dd mm yyyy JAPAN yyyy mm dd USA mm dd yyyy SETVERBCEPOCH SETVERB EPOCH 2 Year nPrevious nYear specifies the base year of 100 year period in which all dates containing only two year digits are assumed to fall The starting value is 1900 SETVERB PATH SETVERB PATH cPrevious cPath identifies the paths that nB uses when searching for a file not found in the current directory The list of paths can be separated by commas or semicolons The starting value is 1228 SETVERBCDEFAULT SETVERB DEFAULT cPath cPrevious cPath identifies the default disk drive and directory The starting value is SETVERBC EXCLUSIVE SETVERB EXCLUSIVE Exclusive IPrevious If IPath is True the default database DBF file open is made in exclusive mode in the other case in shared mode The starting value is True SETVERB SOFTSEEK SETVERB SOFTSEEK SoftSeek Previous If ISoftSeek is True if a DBSEEK index search fails the record pointer is moved to the next record with a higher key If it is False in case of a DBSEEK index search failure the record pointer is moved at EOF The starting value is False SETVERBC
217. t expresses the filter condition in textual form If cCondition cCondition is omitted the DBSETFILTER function will return an empty string for the work area DBSETFILTER sets a logical filter condition for the current work area When a filter is set records which do not meet the filter con dition are not logically visible That is database operations which act on logical records will not consider these records The filter ex pression supplied to DBSETFILTER evaluates to true T if the current record meets the filter condition otherwise it should evalu ate to false F DBSETINDEX DBSETINDEX cOrderBagName NIL is a character value that specifies the file name of the index file index bag to be opened cOrderBagName DBSETINDEX is a database function that adds the contents of an Order Bag into the Order List of the current work area Any Orders already associated with the work area continue to be active If the newly opened Order Bag is the only Order associated with the work area it becomes the controlling Order otherwise the controlling Order remains unchanged If the Order Bag contains more than one Order and there are no other Orders associated with the work area the first Order in the new Order Bag becomes the controlling Order DBSETORDERO DBSETORDER nOrderNum NIL is a numeric value that specifies which of the active in
218. t removes a specified Order from multiple Order Bags ORDDESTROY is not supported for DBFNDX and DBENTX 1195 ORDFORO ORDNAMEO ORDFOR cOrderName nOrder cOrderBagName cForExp is the name of the target Order whose cOrderName cForExp is sought is an integer that identifies the position in nOrder the Order List of the target Order whose cForExp is sought cOrderBagName is the name of an Order Bag containing one or more Orders returns a character expression cForExp that represents the FOR condition of the specified Order If the Order was not cre ated using the FOR clause the return value will be an empty string If the database driver does not support the FOR condition it may either return an empty string or raise an unsupported func tion error depending on the driver ORDKEYO ORDKEY cOrderName nOrder cOrderBagName gt cExpKey is the name of an Order a logical ordering cOrderName of a database is an integer that identifies the position in nOrder the Order List of the target Order whose cExpKey is sought cOrderBagName is the name of a disk file containing one or more Orders ORDKEY is an Order management function that returns charac ter expression cExpKey that represents the key expression of the specified Order ORDLISTADDO ORDLISTADD cOrderBagName cOrderName gt N
219. t stored inside the main database file DBF but inside a separate file DBT A memo field can contain up to 65535 characters that is the same maximum dimension of character fields In fact originally xBases couldn t have character string longer than 254 characters As here memo fields are very similar to long character strings you may forget that there is a difference All the operations that may be applied to character strings may be used with memo fields the following functions may be use espe cially for memo fields or long character strings Concatenate Concatenate without intervening spaces Compare for exact equity lt gt Compare for inequity Compare for sorts before lt Compare for sorts before or same as gt Compare for sorts after gt Compare for sorts after or same as In line assign Test for substring existence ALLTRIM Remove leading and trailing spaces Convert to numeric ASCII code equivalent Locate substring position CTODO Convert to date DESCEND Convert to complemented form EMPTY Test for null or blank string ISALPHA Test for initial letter ISDIGIT Test for initial digit ISLOWER Test for initial lowercase letter ISUPPER Test for initial uppercase letter 1154 HARDCR Replace soft with hard carriage returns MEMOEDIT Edit contents MEMOLINE Extract a line
220. t that only the record nRecord will be used if used means that only the remaining records inside the active alias will be used cDatabase acFields bForCondition bWhileCondition nNextRecords nRecord Rest This function summarises records by key value to a DBF file It sequentially process the active alias scanning the specified scope of records Records with the same key will be summarised inside the destination DBF file The value of numeric fields of records with the same key are added DBUPDATEO DBUPDATE cAlias bKey Random i bReplacement 1216 is the alias containing data to be used to update the active alias is a code block expression using informa bKey tion form the cAlias to obtain a key to refer to the active alias if True allows record in the cAlias to be in cAlias Random any order In this case the active alias must be indexed with the same key as bKey is the code block that will be executed bReplacement when records matches it should contains the criteria for data update This function updates the active alias with data from another DBF file Example dbUpdate INVOICE LAST T FIELD gt TOTAL1 INVOICE gt SUM1 FIELD gt TOTAL2 INVOICE gt SUM2 DBZAPO DBZAP gt NIL This function erases immediately all the records contained insid
221. t work area A value of zero indicates that there is no controlling index and records are being accessed in natural order If no database file is open INDEXORD will also return a Zero INKEYO Input key INKEY 1Seconds nInkeyCode specifies the number of seconds INKEY waits for a keypress You can specify the value in increments as small as one tenth of a second Specifying zero halts the pro gram until a key is pressed If nSeconds is omitted INKEY does not wait for a key press nSeconds 1184 INKEY returns an integer numeric value from 39 to 386 iden tifying the key extracted from the keyboard buffer If the key board buffer is empty INKEY returns zero INKEY returns val ues for all ASCII characters function Alt function Ctrl function Alt letter and Ctrl letter key combinations Key or key combination nInkeyCode value 5 Up arrow 24 Down arrow Ctrl 19 Left arrow Ctrl S Right arrow Ctrl D 1 Ctrl A 6 End Ctrl F 18 PgUp 3 PgDn 397 Ctrl Up arrow 401 Down arrow 26 Ctrl Left arrow Ctrl Z 2 Ctrl Right arrow Ctrl 29 Ctrl Home
222. tatements END WHILE The structure WHILE END defines a loop based on a condition the loop is repeated until the condition is True The loop execution may be broken with the EXIT statement it transfer control after the END while The LOOP statement may be use to repeat the loop it transfer the control to the beginning of the loop WHILE Condition statements EXIT statements Loop statements END IF The IF END control structure executes a section of code if a specified condition is True The structure can also specify alter native code to execute if the condition is False IF statements ELSE statements END Variable declaration Inside nB variables are created using a specific function MEMPUBLIC cVarName For example MEMPUBLIC Name creates the variable Name The scope of the created variable is global and there is no way to restrict the visibility of it When a variable is no more needed or desired it can be released MEMRELEASE cVarName The variable declaration do not defines the variable type Every vari able may receive any kind of data that is that the type depends on the type of data contained Macro structure nB macro must be organised as follow There may be two situa tions Macros with procedures and macros without procedures Macro with procedures 1152
223. th 2M NBASExx4 ZIP DOCS NBASExx5 ZIP EXAMPLEs NBASExx6 ZIP SRCs for version 96 06 16 NBASExx7 ZIP SRCs for the current version Every archive file contains GNU General Public License version 2 in Dos text format the readme file definition COPYING TXT README TXT FILE_ID DIZ The file NBASExx1 ZIP contains also the following files the executable program for DBFNTX and DBFNDxX files linked with RTLINK this manual in Help Text File format NB EXE NB HLP The file NBASExx2 ZIP contains also the following files the run time to execute macro programs for DBFNTX and DBFNDX files handling linked with RTLINK NB EXE The file NBASExx3 2ZIP contains also the following files the executable program for DBFCDX NB EXE DBFMDX DBFNDX and DBFNTX files linked with EXOSPACE NB HLP the user manual in Help Text File format The file NBASExx4 ZIP contains also the following files NB PRN the user manual in printed text format NB RTF the user manual in RTF format NB TXT the user manual in ASCII text format NB HTM the user manual in HTML format The file NBASExx5 ZIP contains also the following files 1137 ADDRESS DBF an example database file ADDRESS NTX index file associated to ADDRESS DBF ADDRESS LBL a
224. the alias to use to merge with records from the active alias the target DBF filename the array of fieldnames which represent the projection of fields form both Aliases into the new DBF file If not specified all fields from the primary work area are in cluded in the target DBE file cAlias cDatabase acFields This function creates a new database file by merging selected records and fields form two work areas Aliases based on a general condi tion It works by making a complete pass through the secondary work area cAlias for each record in the primary work area the ac tive alias evaluating the condition for each record in the secondary work area When bForCondition is evaluated True a new record is created in the target database file cDatabase using the fields speci fied from both work areas inside acFields 1213 DBLABELFORMO a code block containing the WHILE condi bWhileCondition tion to respect The first time that the con dition is False the locate terminates DBLABELFORM cLabel IToPrinter cFile if used means that only the first IN nNextRecord INoConsole bForCondition bWhileCondition nNextRecords will be used nNextR
225. ue is True The recommended value is True SETVERB SCOREBOARD SETVERB SCOREBOARD Scoreboard gt Previous If Scoreboard is True the display of messages from READ and MEMOREAD is allowed in the order case not The starting value is False The recommended value is False nB do not support scoreboard SETVERB DELIMITERS SETVERB DELIMITERS Delimiters Previous If IDelimiters is True GET variables appear on the screen delimited with the delimiter symbols In the other case GET variables are not delimited this way but only with the use of different colors The starting value is False The recommended value is False the use of delimiters creates one more trouble when designing a screen mask 1232 If IMessageCenter is True the PROMPT message line should appear centered on the screen This option is not supported The starting value is False STRADDEXTENTIONO STRADDEXTENTION cName cExt cCompleteName the file name with or without path that is cName probably without extention the extention that must be added to cExt if it has not one This function check cName for the presence of an extention It it has not one cExt will be added STRCUTEXTENTIONO STRCUTEXTENTION cName cName the file name with or without path that is cName probably with extention
226. using arrow keys Up Down Esc closes the pop up the menu Enter starts the selected menu function The following sections describe the menu system Menu File The menu File contains important function on DBF file indexes relations and Replaceable database drivers For database files are considered two aspects the physical aspect and the logical alias When a DBF file is opened it becomes a alias Indexes are considered as index files and index orders It follows a brief menu function description Change directory Changes the actual drive and directory File DBF Contains a pop up menu for DBF operations New DBF A DBF file is a table where columns called Fields must be specified and lines called records are added edited and deleted by the program Field characteristics are the field name must be unique inside the same file it is composed of letters NAME number and underscore _ but it must start with a letter and it is not case sen sitive the field type determinates the type of data it can hold is the field total length in characters it doesn t matter of the type of data is the length of positions after decimal point This information is used nor mally for numeric fields In this case take note that the DECIMAL length together with the decimal point will subtract space for the integer part of the number from the total LENGTH of the filed
227. which a DBF file may be seen ordered A typical index file may contain only one index A index file may have the following extention e NDX single index dBase and dBase plus e NTX single index Clipper e MBX multiple index dBase IV CDX multiple index FoxPro Every index file may be used only in association with the DBF for what it was made The problem is that normally there is no way to avoid errors when the user try to associate the right DBF file with the wrong index To access the data contained inside a DBF file the following list of action may be followed 1135 e Open a DBF file Open a index file Select a particular order Search for a key or move the record pointer on a different way Lock the current record to avoid access from other users Do some editing with the data contained inside the current record using the field names like they were variables Release the lock Move the record pointer to another desired location Lock the current record to avoid access from other users Close the alias Before you go further you have to understand that As orders are contained inside a INDEX BAG file physically dis tinguished form the DBF file it may happen that a DBF file is wrongly opened and edited without the index In this case the INDEX BAG is not updated and when the INDEX BAG will be opened
228. zontal c Vertical This function helps with the windows alignment recalculating and modifying nTop nLeft nBottom and nRight in the way to obtain the desired alignment COPYFILEO COPYFILE cSourceFile cTargetFile cDevice gt NIL cSourceFile the source filename cTargetFile the target filename cDevice the target devicename This function copies the cSourceFile to cTargetFile or to cDevice DBAPPO DBAPP cFileName acFields BForCondition bWhileCondition nNextRecords Record Rest eDriver NIL cFileName the filename containing data to append to the active alias array of fieldnames indicating the fields acFields that should be updated on the active alias default is all a code block containing the FOR condition DA to respect for the data append Will be ap pet data that i ie evaluation of this code block True a code block containing the WHILE con dition to respect for the data append Will be appended data as long as the evaluation ondion of dn code block is True the first time it becomes False the data appending is ter ns hi ly the fi if used means that on e first nNextRecord nNextRecords will be eut if used means that that only the record nRecord nRecord will be appended this option is not available here also if the IRest function saves a place for it cDriver is the o
Download Pdf Manuals
Related Search
Related Contents
Continental Electric CP43189 User's Manual Réglementation commerciale Fév. 2005 CDA WC460 dishwasher INSTRUCTION GUIDE SERIES ACTi D22V surveillance camera Nobo 1902665 Analyse des transitoires par masques de Gabor - LMA Siemens ET375GU11E barbecue Guida per l`utente Haier JTHA30- User's Manual Copyright © All rights reserved.
Failed to retrieve file