diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c14685e3b4..f389e735f4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,54 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-20 11:50 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * tests/onidle.prg + * tests/codebloc.prg + * tests/keywords.prg + * tests/wvtext.prg + * tests/test_all.prg + * tests/ainstest.prg + * doc/es/compiler.txt + * doc/es/file.txt + * contrib/hbct/numconv.prg + * contrib/hbct/tests/expomant.prg + * contrib/hbwhat32/whatutil.prg + * contrib/hbwhat32/winrbar.prg + * contrib/hbwhat32/wintabs.prg + * contrib/hbwhat32/wincomm.prg + * contrib/hbwhat32/wincdlg.prg + * contrib/hbwhat32/wintbar.prg + * contrib/hbwhat32/_wininet.c + * contrib/hbwhat32/wincore.prg + * contrib/hbw32/w32_ole.c + * contrib/hbapollo/tests/apollo.prg + * contrib/hbnf/dispmsg.prg + * contrib/hbnf/fttext.c + * contrib/hbnf/mouse1.prg + * contrib/hbnf/menu1.prg + * contrib/hbnf/sleep.prg + * contrib/hbnf/xbox.prg + * contrib/hbnf/popadder.prg + * contrib/hbnf/mouse2.prg + * contrib/hbnf/pchr.prg + * contrib/hbhpdf/tests/harupdf.prg + * contrib/gtwvg/wvgclass.prg + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/wvgpaint.prg + * contrib/rddads/tests/testmg.prg + * contrib/hbclipsm/tests/testgaug.prg + * contrib/hbfimage/tests/fitest.prg + * contrib/hbmisc/twirler.prg + * contrib/hbtip/httpcln.prg + * contrib/hbtip/ftpcln.prg + * contrib/hbvpdf/hbvpdft.prg + * utils/hbmake/hbmake.prg + * Some more general code cleanups. + * iif(), quote char, #include, filename-casing, = usage cleanups, + hardcoded absolute paths, non-ASCII drawing chars in source. + Using mixed-case filenames to #include .ch files breaks on + non-WinDOS platforms. + 2008-08-20 10:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * utils/hbdoc/hbdoc.prg * utils/hbdoc/gentrf.prg diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index df14f4e9ff..3c37802919 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -25,9 +25,9 @@ //-------------------------------------------------------------------// //-------------------------------------------------------------------// -#include 'inkey.ch' -#include 'common.ch' -#include 'wvtwin.ch' +#include "inkey.ch" +#include "common.ch" +#include "wvtwin.ch" REQUEST DbfCdx @@ -65,12 +65,12 @@ REQUEST DbfCdx //-------------------------------------------------------------------// -#define IMAGE_VOUCH 'vouch1.bmp' -#define IMAGE_BROWSE 'v_browse.ico' -#define IMAGE_VR 'vr_1.ico' -#define IMAGE_NOTES 'v_notes.ico' -#define IMAGE_TOOLS 'v_tools.ico' -#define IMAGE_HELP 'v_notes.ico' +#define IMAGE_VOUCH "vouch1.bmp" +#define IMAGE_BROWSE "v_browse.ico" +#define IMAGE_VR "vr_1.ico" +#define IMAGE_NOTES "v_notes.ico" +#define IMAGE_TOOLS "v_tools.ico" +#define IMAGE_HELP "v_notes.ico" //-------------------------------------------------------------------// // @@ -114,18 +114,18 @@ static shIcon, shImage static aSlides := {} #ifdef __XCC__ -static paint_:= { { '', {} } } +static paint_:= { { "", {} } } #endif //-------------------------------------------------------------------// PROCEDURE Main( cDSN ) LOCAL aLastPaint, clr, scr, bWhen, bValid, a_:={} - LOCAL dDate := ctod( '' ) - LOCAL cName := Pad( 'Pritpal Bedi', 35 ) - LOCAL cAdd1 := Pad( '60, New Professor Colony', 35 ) - LOCAL cAdd2 := Pad( 'Ludhiana, INDIA', 35 ) - LOCAL cAdd3 := Pad( 'http://www.vouchcac.com', 35 ) + LOCAL dDate := ctod( "" ) + LOCAL cName := Pad( "Pritpal Bedi", 35 ) + LOCAL cAdd1 := Pad( "60, New Professor Colony", 35 ) + LOCAL cAdd2 := Pad( "Ludhiana, INDIA", 35 ) + LOCAL cAdd3 := Pad( "http://www.vouchcac.com", 35 ) LOCAL nSlry := 20000 LOCAL aBlocks := {} LOCAL nColGet := 8 @@ -136,7 +136,7 @@ PROCEDURE Main( cDSN ) LOCAL nRgt := 75 LOCAL nMaxRows:= MaxRow() LOCAL nBtnRow := nMaxRows - 1 - LOCAL cLabel := '(x)Harbour simulated GUI.' + LOCAL cLabel := "(x)Harbour simulated GUI." LOCAL aObjects:= WvtSetObjects( {} ) LOCAL aObj := {} LOCAL hPopup @@ -154,7 +154,7 @@ PROCEDURE Main( cDSN ) WvtSetKeys( .t. ) Popups( 1 ) - Wvt_SetFont( 'Courier New', 18, 0, 0 ) + Wvt_SetFont( "Courier New", 18, 0, 0 ) Wvt_SetMouseMove( .t. ) Wvt_ShowWindow( SW_RESTORE ) @@ -166,9 +166,9 @@ PROCEDURE Main( cDSN ) // Wvt_SetMousePos( 2,40 ) - aAdd( aBlocks, {|| Wvt_SetIcon( 'vr_1.ico' ) } ) - aAdd( aBlocks, {|| Wvt_SetTitle( 'Vouch' ) } ) - aAdd( aBlocks, {|| Wvt_DrawLabel( 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), 'Arial', 26, , , , , .t., .t. ) } ) + aAdd( aBlocks, {|| Wvt_SetIcon( "vr_1.ico" ) } ) + aAdd( aBlocks, {|| Wvt_SetTitle( "Vouch" ) } ) + aAdd( aBlocks, {|| Wvt_DrawLabel( 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), "Arial", 26, , , , , .t., .t. ) } ) aAdd( aBlocks, {|| Wvt_DrawBoxRaised( nTop, nLft, nBtm, nRgt ) } ) aAdd( aBlocks, {|| Wvt_DrawBoxRecessed( 7, 61, 13, 70 ) } ) aAdd( aBlocks, {|| Wvt_DrawBoxGroup( 15, 59, 18, 72 ) } ) @@ -204,42 +204,42 @@ PROCEDURE Main( cDSN ) } ) WvtSetObjects( { OBJ_TYPE_BUTTON, 3, nBtnRow,16,nBtnRow+1,19, ; - {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,'Expand',IMAGE_NOTES,btnFDisp ) },; - {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,'Expand',IMAGE_NOTES,btnFMOver ) },; - {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,'Expand',IMAGE_NOTES,btnFBDown ) },; - {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,'Expand',IMAGE_NOTES,btnFBUp ) ,; + {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,"Expand",IMAGE_NOTES,btnFDisp ) },; + {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,"Expand",IMAGE_NOTES,btnFMOver ) },; + {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,"Expand",IMAGE_NOTES,btnFBDown ) },; + {|| Wvt_DrawButton( nBtnRow,16,nBtnRow+1,19,"Expand",IMAGE_NOTES,btnFBUp ) ,; eval( SetKey( K_F3 ) ) } ; } ) WvtSetObjects( { OBJ_TYPE_BUTTON, 4, nBtnRow,21,nBtnRow+1,24, ; - {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,'Shrink', , btnFDisp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; - {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,'Shrink', , btnFMOver, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; - {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,'Shrink', , btnFBDown, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; - {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,'Shrink', , btnFBUp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) ,; + {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,"Shrink", , btnFDisp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; + {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,"Shrink", , btnFMOver, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; + {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,"Shrink", , btnFBDown, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; + {|| Wvt_DrawButton( nBtnRow,21,nBtnRow+1,24,"Shrink", , btnFBUp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) ,; eval( SetKey( K_F4 ) ) } ; } ) WvtSetObjects( { OBJ_TYPE_BUTTON, 5, nBtnRow,26,nBtnRow+1,29, ; - {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,'Minimize',IMAGE_TOOLS, btnFDisp ) },; - {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,'Minimize',IMAGE_TOOLS, btnFMOver ) },; - {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,'Minimize',IMAGE_TOOLS, btnFBDown ) },; - {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,'Minimize',IMAGE_TOOLS, btnFBUp ) ,; + {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,"Minimize",IMAGE_TOOLS, btnFDisp ) },; + {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,"Minimize",IMAGE_TOOLS, btnFMOver ) },; + {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,"Minimize",IMAGE_TOOLS, btnFBDown ) },; + {|| Wvt_DrawButton( nBtnRow,26,nBtnRow+1,29,"Minimize",IMAGE_TOOLS, btnFBUp ) ,; eval( SetKey( K_F6 ) ) },; } ) WvtSetObjects( { OBJ_TYPE_BUTTON, 6, nBtnRow,31,nBtnRow+1,34, ; - {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,'Partial',IMAGE_HELP, btnFDisp ) },; - {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,'Partial',IMAGE_HELP, btnFMOver ) },; - {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,'Partial',IMAGE_HELP, btnFBDown ) },; - {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,'Partial',IMAGE_HELP, btnFBUp ) ,; + {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,"Partial",IMAGE_HELP, btnFDisp ) },; + {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,"Partial",IMAGE_HELP, btnFMOver ) },; + {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,"Partial",IMAGE_HELP, btnFBDown ) },; + {|| Wvt_DrawButton( nBtnRow,31,nBtnRow+1,34,"Partial",IMAGE_HELP, btnFBUp ) ,; eval( SetKey( K_F7 ) ) },; } ) WvtSetObjects( { OBJ_TYPE_BUTTON, 7, nBtnRow,36,nBtnRow+1,39, ; - {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,'Lines',IMAGE_VR, btnFDisp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; - {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,'Lines',IMAGE_VR, btnFMOver, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; - {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,'Lines',IMAGE_VR, btnFBDown, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; - {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,'Lines',IMAGE_VR, btnFBUp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) ,; + {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,"Lines",IMAGE_VR, btnFDisp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; + {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,"Lines",IMAGE_VR, btnFMOver, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; + {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,"Lines",IMAGE_VR, btnFBDown, rgb( 100,22,241 ), rgb( 0,100,0 ) ) },; + {|| Wvt_DrawButton( nBtnRow,36,nBtnRow+1,39,"Lines",IMAGE_VR, btnFBUp , rgb( 100,22,241 ), rgb( 0,100,0 ) ) ,; eval( SetKey( K_F8 ) ) } ; } ) @@ -248,29 +248,29 @@ PROCEDURE Main( cDSN ) aLastPaint := WvtSetBlocks( aBlocks ) scr := SaveScreen( 0,0,maxrow(),maxcol() ) - clr := SetColor( 'N/W' ) + clr := SetColor( "N/W" ) CLS - SetColor( 'N/W,N/GR*,,,N/W*' ) + SetColor( "N/W,N/GR*,,,N/W*" ) Wvt_SetMenu( oMenu:hMenu ) SetKey( Wvt_SetMenuKeyEvent(), { || ActivateMenu( oMenu ) } ) - @ 6, nColGet SAY '< Date >' - @ 9, nColGet SAY '<' + PadC( 'Name', 33 ) + '>' - @ 12, nColGet SAY '<' + PadC( 'Address', 33 ) + '>' - @ 16, 61 SAY '< Salary >' + @ 6, nColGet SAY "< Date >" + @ 9, nColGet SAY "<" + PadC( "Name", 33 ) + ">" + @ 12, nColGet SAY "<" + PadC( "Address", 33 ) + ">" + @ 16, 61 SAY "< Salary >" - dDate := ctod( '04/01/04' ) + dDate := ctod( "04/01/04" ) - @ 7, nColGet GET dDate WHEN DispStatusMsg( 'Date must be Valid' ); + @ 7, nColGet GET dDate WHEN DispStatusMsg( "Date must be Valid" ); VALID ClearStatusMsg() - @ 10, nColGet GET cName WHEN DispStatusMsg( 'Must be one of the list!' ); + @ 10, nColGet GET cName WHEN DispStatusMsg( "Must be one of the list!" ); VALID ( VouChoice() < 7 .and. ClearStatusMsg() ) @ 13, nColGet GET cAdd1 @ 15, nColGet GET cAdd2 @ 17, nColGet GET cAdd3 - @ 17, 61 GET nSlry PICTURE '@Z 9999999.99' + @ 17, 61 GET nSlry PICTURE "@Z 9999999.99" READ @@ -296,7 +296,7 @@ Function HB_GTSYS() PROCEDURE WvtNextGets() LOCAL aLastPaint, clr - LOCAL dDate := ctod( '' ) + LOCAL dDate := ctod( "" ) LOCAL cName := Space( 35 ) LOCAL cAdd1 := Space( 35 ) LOCAL cAdd2 := Space( 35 ) @@ -312,7 +312,7 @@ PROCEDURE WvtNextGets() LOCAL kf2 := SetKey( K_F2, {|| WvtGets() } ) LOCAL kf3 := SetKey( K_F3, {|| WvtWindowExpand( 1 ) } ) LOCAL kf4 := SetKey( K_F4, {|| WvtWindowExpand( -1 ) } ) - LOCAL cLabel := 'VOUCH, that GROWS with you' + LOCAL cLabel := "VOUCH, that GROWS with you" LOCAL aPalette := Wvt_GetPalette() LOCAL aNewPalette:= aclone( aPalette ) LOCAL aObjects := WvtSetObjects( {} ) @@ -328,7 +328,7 @@ PROCEDURE WvtNextGets() Wvt_SetPalette( aNewPalette ) - aAdd( aBlocks, {|| Wvt_SetTitle( 'Wvt Gets 2nd Window with Different Palette' ) } ) + aAdd( aBlocks, {|| Wvt_SetTitle( "Wvt Gets 2nd Window with Different Palette" ) } ) aAdd( aBlocks, {|| Wvt_DrawLine( maxrow()-1,0,maxrow()-1,maxcol() ) }) aAdd( aBlocks, {|| Wvt_SetBrush( 0, rgb( 32,255,100 ) ) } ) aAdd( aBlocks, {|| Wvt_DrawEllipse( 6,50,10,58 ) } ) @@ -337,32 +337,32 @@ PROCEDURE WvtNextGets() aAdd( aBlocks, {|| Wvt_DrawBoxGroupRaised( 5, 6, 19, 72 ) } ) aAdd( aBlocks, {|| aEval( GetList, {|oGet| Wvt_DrawBoxGet( oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 21, 6,22, 9,'New' ,'vouch1.bmp' ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 21,11,22,14,'Browse','vouch1.bmp', 1, rgb( 255,255,255 ) ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 21,16,22,19, ,'vouch1.bmp' ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 21,21,22,24,'Data',, 0, rgb( 100,22,241 ), rgb( 198,198,198 ) ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 21,26,22,29,'Flat',IMAGE_VR,2 ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 21,31,22,34,'Outline',IMAGE_VR,3 ) } ) - aAdd( aBlocks, {|| Wvt_DrawButton( 22,36,22,41,'Data',, 0, rgb( 100,22,241 ), rgb( 198,198,198 ) ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 21, 6,22, 9,"New" ,"vouch1.bmp" ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 21,11,22,14,"Browse","vouch1.bmp", 1, rgb( 255,255,255 ) ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 21,16,22,19, ,"vouch1.bmp" ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 21,21,22,24,"Data",, 0, rgb( 100,22,241 ), rgb( 198,198,198 ) ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 21,26,22,29,"Flat",IMAGE_VR,2 ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 21,31,22,34,"Outline",IMAGE_VR,3 ) } ) + aAdd( aBlocks, {|| Wvt_DrawButton( 22,36,22,41,"Data",, 0, rgb( 100,22,241 ), rgb( 198,198,198 ) ) } ) aLastPaint := WvtSetBlocks( aBlocks ) - clr := SetColor( 'N/W,N/GR*,,,N/W*' ) + clr := SetColor( "N/W,N/GR*,,,N/W*" ) CLS - @ MaxRow(), 0 SAY PadC( '(x)Harbour + WVT Console GUI Screen',80 ) COLOR 'R+/W' + @ MaxRow(), 0 SAY PadC( "(x)Harbour + WVT Console GUI Screen",80 ) COLOR "R+/W" - @ 6, nColGet SAY '< Date >' - @ 9, nColGet SAY '<' + PadC( 'Name', 33 ) + '>' - @ 12, nColGet SAY '<' + PadC( 'Address', 33) + '>' - @ 16, 61 SAY '< Salary >' + @ 6, nColGet SAY "< Date >" + @ 9, nColGet SAY "<" + PadC( "Name", 33 ) + ">" + @ 12, nColGet SAY "<" + PadC( "Address", 33) + ">" + @ 16, 61 SAY "< Salary >" @ 7, nColGet GET dDate @ 10, nColGet GET cName @ 13, nColGet GET cAdd1 @ 15, nColGet GET cAdd2 @ 17, nColGet GET cAdd3 - @ 17, 61 GET nSlry PICTURE '@Z 9999999.99' + @ 17, 61 GET nSlry PICTURE "@Z 9999999.99" READ @@ -426,7 +426,7 @@ FUNCTION Wvt_SetFocus( hWnd ) LOCAL nRow := row() LOCAL nCol := col() - DispOutAt( 1,3, 'Focus Gained!', 'R/W' ) + DispOutAt( 1,3, "Focus Gained!", "R/W" ) DevPos( nRow, nCol ) @@ -441,7 +441,7 @@ FUNCTION Wvt_KillFocus( hWnd ) LOCAL nRow := row() LOCAL nCol := col() - DispOutAt( 1,3, 'Focus Lost...', 'B/W' ) + DispOutAt( 1,3, "Focus Lost...", "B/W" ) DevPos( nRow, nCol ) @@ -558,7 +558,7 @@ FUNCTION WvtSetObjects( aObject ) if empty( aObject ) aObjects := {} else - if valtype( aObject[ 1 ] ) == 'A' + if valtype( aObject[ 1 ] ) == "A" aeval( aObject, {|e_| aadd( aObjects, e_ ) } ) else aSize( aObject, WVT_OBJ_VRBLS ) @@ -590,7 +590,7 @@ FUNCTION WvtWindowExpand( nUnits ) sUnits += nUnits - Wvt_setFont( 'Courier New', sUnits ) + Wvt_setFont( "Courier New", sUnits ) RETURN .t. //-------------------------------------------------------------------// @@ -602,10 +602,10 @@ FUNCTION VouChoice( aChoices ) LOCAL scr, clr, nChoice - DEFAULT aChoices TO { 'One','Two','Three','Four','Five','Six','Seven' } + DEFAULT aChoices TO { "One","Two","Three","Four","Five","Six","Seven" } scr := SaveScreen( 7,48,13,55 ) - clr := SetColor( 'N/W*,GR+/B*,,,GR+/B' ) + clr := SetColor( "N/W*,GR+/B*,,,GR+/B" ) nChoice := aChoice( 7, 48, 13, 55, aChoices ) @@ -627,7 +627,7 @@ FUNCTION WvtMyBrowse() LOCAL nCursor := setCursor( 0 ) LOCAL nRow := row() LOCAL nCol := col() - LOCAL cColor := SetColor( 'N/W*,N/GR*,,,N/W*' ) + LOCAL cColor := SetColor( "N/W*,N/GR*,,,N/W*" ) LOCAL cScr := SaveScreen( 0,0,maxrow(),maxcol() ) LOCAL aObjects:= WvtSetObjects( {} ) LOCAL hPopup := Wvt_SetPopupMenu() @@ -635,18 +635,18 @@ FUNCTION WvtMyBrowse() STATIC nStyle := 0 - cRDD := 'DBFCDX' - cFileDbf := 'test.dbf' - cFileIndex := 'test.z01' + cRDD := "DBFCDX" + cFileDbf := "test.dbf" + cFileIndex := "test.z01" USE ( cFileDbf ) NEW SHARED VIA ( cRDD ) if NetErr() return nil endif if fLock() - INDEX ON Test->FIRST TAG '001' TO ( cFileIndex ) - INDEX ON Test->LAST TAG '002' TO ( cFileIndex ) - INDEX ON Test->CITY TAG '003' TO ( cFileIndex ) + INDEX ON Test->FIRST TAG "001" TO ( cFileIndex ) + INDEX ON Test->LAST TAG "002" TO ( cFileIndex ) + INDEX ON Test->CITY TAG "003" TO ( cFileIndex ) dbUnlock() endif SET INDEX TO @@ -661,8 +661,8 @@ FUNCTION WvtMyBrowse() //oBrowse := TBrowseNew( nTop + 3, nLeft + 2, nBottom - 1, nRight - 2 ) oBrowse := TBrowseWVG():New( nTop + 3, nLeft + 2, nBottom - 1, nRight - 2 ) - oBrowse:ColSep := ' ' - oBrowse:HeadSep := '__' + oBrowse:ColSep := " " + oBrowse:HeadSep := "__" oBrowse:GoTopBlock := { || dbGoTop() } oBrowse:GoBottomBlock := { || dbGoBottom() } oBrowse:SkipBlock := { | nSkip | dbSkipBlock( nSkip,oBrowse ) } @@ -682,8 +682,8 @@ FUNCTION WvtMyBrowse() nStyle++ - aAdd( aBlocks, {|| Wvt_SetIcon( 'dia_excl.ico' ) } ) - aAdd( aBlocks, {|| Wvt_SetTitle( 'WVT Gui TBrowse()' ) } ) + aAdd( aBlocks, {|| Wvt_SetIcon( "dia_excl.ico" ) } ) + aAdd( aBlocks, {|| Wvt_SetTitle( "WVT Gui TBrowse()" ) } ) aAdd( aBlocks, {|| Wvt_DrawBoxRaised( nTop, nLeft, nBottom, nRight ) } ) aAdd( aBlocks, {|| Wvt_DrawBoxRecessed( nTop+3, nLeft+2, nBottom-1, nRight-2 ) } ) aAdd( aBlocks, {|| Wvt_DrawGridHorz( oBrowse:nTop+3, oBrowse:nLeft, oBrowse:nRight, oBrowse:nBottom - oBrowse:nTop - 2 ) } ) @@ -691,8 +691,8 @@ FUNCTION WvtMyBrowse() aLastPaint := WvtSetBlocks( aBlocks ) - DispBox( 0, 0, maxrow(), maxcol(), ' ', 'N/W' ) - DispOutAt( nTop + 1, nleft, padc( CurDrive()+':\'+CurDir()+'\'+'Test.dbf', nRight - nLeft + 1 ), 'W+/W' ) + DispBox( 0, 0, maxrow(), maxcol(), " ", "N/W" ) + DispOutAt( nTop + 1, nleft, padc( CurDrive()+":\"+CurDir()+"\"+"test.dbf", nRight - nLeft + 1 ), "W+/W" ) While !lEnd oBrowse:ForceStable() @@ -956,12 +956,12 @@ STATIC FUNCTION CfgMyBrowse( aFields, cUseAlias, aTLBR, cDesc, oParent, cColorSp LOCAL info_, oWvtBrw, oBrowse, i, bBlock LOCAL aPopup := {} - aadd( aPopup, { 'Down' , {|| oBrowse:Down() , oBrowse:ForceStable() } } ) - aadd( aPopup, { 'Up' , {|| oBrowse:Up() , oBrowse:ForceStable() } } ) - aadd( aPopup, { 'Page Down', {|| oBrowse:PageDown(), oBrowse:ForceStable() } } ) - aadd( aPopup, { 'Page Up' , {|| oBrowse:PageUp() , oBrowse:ForceStable() } } ) - aadd( aPopup, { 'Top' , {|| oBrowse:GoTop() , oBrowse:ForceStable() } } ) - aadd( aPopup, { 'Bottom' , {|| oBrowse:GoBottom(), oBrowse:ForceStable() } } ) + aadd( aPopup, { "Down" , {|| oBrowse:Down() , oBrowse:ForceStable() } } ) + aadd( aPopup, { "Up" , {|| oBrowse:Up() , oBrowse:ForceStable() } } ) + aadd( aPopup, { "Page Down", {|| oBrowse:PageDown(), oBrowse:ForceStable() } } ) + aadd( aPopup, { "Page Up" , {|| oBrowse:PageUp() , oBrowse:ForceStable() } } ) + aadd( aPopup, { "Top" , {|| oBrowse:GoTop() , oBrowse:ForceStable() } } ) + aadd( aPopup, { "Bottom" , {|| oBrowse:GoBottom(), oBrowse:ForceStable() } } ) Select( cUseAlias ) info_:= DbStruct() @@ -969,8 +969,8 @@ STATIC FUNCTION CfgMyBrowse( aFields, cUseAlias, aTLBR, cDesc, oParent, cColorSp //oBrowse := TBrowseNew( aTLBR[ 1 ], aTLBR[ 2 ], aTLBR[ 3 ], aTLBR[ 4 ] ) oBrowse := TBrowseWVG():New( aTLBR[ 1 ], aTLBR[ 2 ], aTLBR[ 3 ], aTLBR[ 4 ] ) - oBrowse:ColSep := ' ' - oBrowse:HeadSep := '__' + oBrowse:ColSep := " " + oBrowse:HeadSep := "__" oBrowse:ColorSpec := cColorSpec oBrowse:GoTopBlock := { || dbGoTop() } oBrowse:GoBottomBlock := { || dbGoBottom() } @@ -993,7 +993,7 @@ STATIC FUNCTION CfgMyBrowse( aFields, cUseAlias, aTLBR, cDesc, oParent, cColorSp oWvtBrw:oBrw := oBrowse oWvtBrw:cDesc := cDesc oWvtBrw:nPointer := WVT_IDC_HAND - oWvtBrw:cColorHilite := 'W+/B*' + oWvtBrw:cColorHilite := "W+/B*" oWvtBrw:Tooltip := cDesc oWvtBrw:aPopup := aPopup @@ -1012,10 +1012,10 @@ FUNCTION WvtPartialScreen() aLastPaint := WvtSetBlocks( {} ) - DispBox( 7, 20, 15, 60, ' ', 'W/GR*' ) - @ 10,25 SAY 'Wvt_SaveScreen()' COLOR 'N/GR*' - @ 11,25 SAY 'Wvt_RestScreen()' COLOR 'N/GR*' - @ 13,25 SAY 'Press Esc ' COLOR 'N/GR*' + DispBox( 7, 20, 15, 60, " ", "W/GR*" ) + @ 10,25 SAY "Wvt_SaveScreen()" COLOR "N/GR*" + @ 11,25 SAY "Wvt_RestScreen()" COLOR "N/GR*" + @ 13,25 SAY "Press Esc " COLOR "N/GR*" Wvt_DrawBoxRecessed( 8,22,14,58 ) wvtScr1 := Wvt_SaveScreen( 7,20,15,60 ) @@ -1023,10 +1023,10 @@ FUNCTION WvtPartialScreen() do while inkey( 0 ) != K_ESC enddo - DispBox( 7, 20, 15, 60, ' ', 'W/B*' ) - @ 10,25 SAY 'Wvt_SaveScreen()' COLOR 'N/B*' - @ 11,25 SAY 'Wvt_RestScreen()' COLOR 'N/B*' - @ 13,25 SAY 'Press Esc ' COLOR 'N/B*' + DispBox( 7, 20, 15, 60, " ", "W/B*" ) + @ 10,25 SAY "Wvt_SaveScreen()" COLOR "N/B*" + @ 11,25 SAY "Wvt_RestScreen()" COLOR "N/B*" + @ 13,25 SAY "Press Esc " COLOR "N/B*" Wvt_DrawBoxRecessed( 8,22,14,58 ) do while inkey( 0 ) != K_ESC @@ -1048,7 +1048,7 @@ FUNCTION WvtPartialScreen() function WvtLines() LOCAL scr := SaveScreen( 0,0,maxrow(),maxcol() ) - LOCAL clr := SetColor( 'N/W' ) + LOCAL clr := SetColor( "N/W" ) LOCAL nRows := maxrow() LOCAL nCols := maxcol() LOCAL aLastPaint := WvtSetBlocks( {} ) @@ -1064,14 +1064,14 @@ function WvtLines() aAdd( aBlocks, {|| Wvt_DrawLine( 3, 0, 3, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED , WVT_LINE_CENTER, WVT_LINE_DASH , 0, Rgb( 255,0,0 ) ) } ) aAdd( aBlocks, {|| Wvt_DrawLine( 4, 0, 4, nCols, WVT_LINE_HORZ, WVT_LINE_RECESSED, WVT_LINE_BOTTOM ) } ) - @ 0, 1 SAY 'Center Raised' - @ 1,11 say 'Top Recessed' - @ 2,21 say 'Center Plain White 3 Pixels' - @ 3,31 say 'Center Raised Dotted' - @ 4,41 SAY 'Bottom Recessed' - @ 5, 1 SAY 'Bottom Checked' + @ 0, 1 SAY "Center Raised" + @ 1,11 say "Top Recessed" + @ 2,21 say "Center Plain White 3 Pixels" + @ 3,31 say "Center Raised Dotted" + @ 4,41 SAY "Bottom Recessed" + @ 5, 1 SAY "Bottom Checked" - @ nRows, 0 Say PadC( 'Press ESC to Quit', nCols+1 ) COLOR 'GR+/W' + @ nRows, 0 Say PadC( "Press ESC to Quit", nCols+1 ) COLOR "GR+/W" aAdd( aBlocks, {|| Wvt_DrawLine( 11, 5,nRows-2, 5, WVT_LINE_VERT, WVT_LINE_RAISED , WVT_LINE_CENTER ) } ) aAdd( aBlocks, {|| Wvt_DrawLine( 11, 6,nRows-2, 6, WVT_LINE_VERT, WVT_LINE_RECESSED, WVT_LINE_CENTER ) } ) @@ -1084,11 +1084,11 @@ function WvtLines() WvtSetBlocks( aBlocks ) - @ 12,5 Say 'A' - @ 13,6 Say 'B' - @ 14,7 Say 'C' - @ 15,8 Say 'D' - @ 16,9 Say 'E' + @ 12,5 Say "A" + @ 13,6 Say "B" + @ 14,7 Say "C" + @ 15,8 Say "D" + @ 16,9 Say "E" do while ( inkey(0) != 27 ) enddo @@ -1109,7 +1109,7 @@ function WvtLines() FUNCTION DispStatusMsg( cMsg ) - Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb(198,198,198), 'Arial', 18, , 900 ) + Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb(198,198,198), "Arial", 18, , 900 ) RETURN .t. @@ -1119,7 +1119,7 @@ FUNCTION ClearStatusMsg() LOCAL nRow := Row() LOCAL nCol := Col() - DispOutAt( MaxRow(), 42, space( 37 ), 'W/W' ) + DispOutAt( MaxRow(), 42, space( 37 ), "W/W" ) SetPos( nRow, nCol ) @@ -1150,19 +1150,19 @@ FUNCTION Popups( nID, lDestroy ) if hPop == nil hPop := Wvt_CreatePopupMenu() - Wvt_AppendMenu( hPop, nPrompt, K_F2, 'Second Get Screen' ) - Wvt_AppendMenu( hPop, nPrompt, K_F3, 'Expand Window' ) - Wvt_AppendMenu( hPop, nPrompt, K_F4, 'Shrink Window' ) - Wvt_AppendMenu( hPop, nPrompt, K_F5, 'Browse' ) - Wvt_AppendMenu( hPop, nPrompt, K_F6, 'Minimize' ) - Wvt_AppendMenu( hPop, nPrompt, K_F7, 'Partial Screen' ) - Wvt_AppendMenu( hPop, nPrompt, K_F8, 'Lines' ) - Wvt_AppendMenu( hPop, nPrompt, K_F9, 'Choose Font' ) - Wvt_AppendMenu( hPop, nPrompt, K_F10,'Choose Color' ) + Wvt_AppendMenu( hPop, nPrompt, K_F2, "Second Get Screen" ) + Wvt_AppendMenu( hPop, nPrompt, K_F3, "Expand Window" ) + Wvt_AppendMenu( hPop, nPrompt, K_F4, "Shrink Window" ) + Wvt_AppendMenu( hPop, nPrompt, K_F5, "Browse" ) + Wvt_AppendMenu( hPop, nPrompt, K_F6, "Minimize" ) + Wvt_AppendMenu( hPop, nPrompt, K_F7, "Partial Screen" ) + Wvt_AppendMenu( hPop, nPrompt, K_F8, "Lines" ) + Wvt_AppendMenu( hPop, nPrompt, K_F9, "Choose Font" ) + Wvt_AppendMenu( hPop, nPrompt, K_F10,"Choose Color" ) Wvt_AppendMenu( hPop, MF_SEPARATOR ) - Wvt_AppendMenu( hPop, nPrompt, K_F5, 'Browse' ) + Wvt_AppendMenu( hPop, nPrompt, K_F5, "Browse" ) endif @@ -1170,22 +1170,22 @@ FUNCTION Popups( nID, lDestroy ) if hPop == nil hPop := Wvt_CreatePopupMenu() - Wvt_AppendMenu( hPop, nPrompt, K_DOWN , 'Down' ) - Wvt_AppendMenu( hPop, nPrompt, K_UP , 'Up' ) - Wvt_AppendMenu( hPop, nPrompt, K_PGDN , 'Page Down' ) - Wvt_AppendMenu( hPop, nPrompt, K_PGUP , 'Page Up' ) - Wvt_AppendMenu( hPop, nPrompt, K_CTRL_PGUP, 'Top' ) - Wvt_AppendMenu( hPop, nPrompt, K_CTRL_PGDN, 'Bottom' ) + Wvt_AppendMenu( hPop, nPrompt, K_DOWN , "Down" ) + Wvt_AppendMenu( hPop, nPrompt, K_UP , "Up" ) + Wvt_AppendMenu( hPop, nPrompt, K_PGDN , "Page Down" ) + Wvt_AppendMenu( hPop, nPrompt, K_PGUP , "Page Up" ) + Wvt_AppendMenu( hPop, nPrompt, K_CTRL_PGUP, "Top" ) + Wvt_AppendMenu( hPop, nPrompt, K_CTRL_PGDN, "Bottom" ) Wvt_AppendMenu( hPop, MF_SEPARATOR ) hPop1 := Wvt_CreatePopupMenu() - Wvt_AppendMenu( hPop1, nPrompt, K_RIGHT , 'Right' ) - Wvt_AppendMenu( hPop1, nPrompt, K_LEFT , 'Left' ) - Wvt_AppendMenu( hPop1, nPrompt, K_END , 'End' ) - Wvt_AppendMenu( hPop1, nPrompt, K_HOME , 'Home' ) + Wvt_AppendMenu( hPop1, nPrompt, K_RIGHT , "Right" ) + Wvt_AppendMenu( hPop1, nPrompt, K_LEFT , "Left" ) + Wvt_AppendMenu( hPop1, nPrompt, K_END , "End" ) + Wvt_AppendMenu( hPop1, nPrompt, K_HOME , "Home" ) - Wvt_AppendMenu( hPop, MF_ENABLED+MF_POPUP, hPop1, 'Column Movement' ) + Wvt_AppendMenu( hPop, MF_ENABLED+MF_POPUP, hPop1, "Column Movement" ) endif @@ -1307,27 +1307,27 @@ STATIC FUNCTION MyDialogOne() hPopup := Wvt_SetPopupMenu() Popups() - cTxt := 'GtWvt is capable of designing virtually any preceivable control ' - cTxt := cTxt + 'Windows offers.' + cTxt := "GtWvt is capable of designing virtually any preceivable control " + cTxt := cTxt + "Windows offers." cTxt := cTxt + CRLF + CRLF - cTxt := cTxt + 'This text is placed in a WvtTextBox() control with ' - cTxt := cTxt + 'font and alignment adjustments!' + cTxt := cTxt + "This text is placed in a WvtTextBox() control with " + cTxt := cTxt + "font and alignment adjustments!" cTxt := cTxt + CRLF + CRLF - cTxt := cTxt + 'Enjoy - Pritpal Bedi, INDIA' + cTxt := cTxt + "Enjoy - Pritpal Bedi, INDIA" aImg_:={} - aadd( aImg_, 'v_lock.bmp' ) - aadd( aImg_, 'v_new.bmp' ) - aadd( aImg_, 'v_clclt.bmp' ) - aadd( aImg_, 'v_calend.bmp' ) - aadd( aImg_, 'v_index.bmp' ) - aadd( aImg_, 'v_notes1.bmp' ) - aadd( aImg_, 'v_selct1.bmp' ) + aadd( aImg_, "v_lock.bmp" ) + aadd( aImg_, "v_new.bmp" ) + aadd( aImg_, "v_clclt.bmp" ) + aadd( aImg_, "v_calend.bmp" ) + aadd( aImg_, "v_index.bmp" ) + aadd( aImg_, "v_notes1.bmp" ) + aadd( aImg_, "v_selct1.bmp" ) nWinRows := 55 nWinCols := 185 - cWinTitle := 'WvtGui Dialog One' - cFont := 'Courier New' + cWinTitle := "WvtGui Dialog One" + cFont := "Courier New" nHeight := 13 oDlg := WvtDialog():New( nWinRows, nWinCols, cWinTitle, cFont, nHeight ) @@ -1336,11 +1336,11 @@ STATIC FUNCTION MyDialogOne() oBar := WvtStatusBar():New( oDlg,201 ) oBar:SetPanels( { 50,100 } ) - oBar:SetText( 1, 'Tab.SH_Tab.Left_Click - Select a Browse' ) - oBar:SetText( 2, 'GtWvt is Fantastic', 'w+/W' ) - oBar:SetText( 3, 'WOW' ) + oBar:SetText( 1, "Tab.SH_Tab.Left_Click - Select a Browse" ) + oBar:SetText( 2, "GtWvt is Fantastic", "w+/W" ) + oBar:SetText( 3, "WOW" ) oBar:nPointer := WVT_IDC_HAND - oBar:Tooltip := 'GtWvt Statusbar with 3 panels' + oBar:Tooltip := "GtWvt Statusbar with 3 panels" oDlg:AddObject( oBar ) oBox := WvtStatic():New( oDlg,110,4,oDlg:MaxCol()-40,7,oDlg:MaxCol()-2 ) @@ -1348,7 +1348,7 @@ STATIC FUNCTION MyDialogOne() oDlg:AddObject( oBox ) oText := WvtLabel():New( oDlg, 101, 4, oDlg:MaxCol()-40, 7,oDlg:MaxCol()-2 ) - oText:Text := '(x)Harbour' + oText:Text := "(x)Harbour" oText:nFontHeight := 36 oText:nAlignHorz := 2 oText:nAlignVert := 2 @@ -1358,26 +1358,26 @@ STATIC FUNCTION MyDialogOne() oText:nTextColorHoverOn := RGB( 255, 255, 0 ) oText:nBackColorHoverOn := RGB( 255, 100, 12 ) oText:lItalic := .t. - oText:ToolTip := 'Software that GROWS with you' + oText:ToolTip := "Software that GROWS with you" oText:bOnSelect := {|o,v| .t. } oDlg:AddObject( oText ) oImg := WvtImage():New( oDlg,102,20,oDlg:MaxCol()-40,37,oDlg:MaxCol()-2 ) oImg:cImage := aImg_[ 5 ] - oImg:Tooltip := 'WvtImage():New()' + oImg:Tooltip := "WvtImage():New()" oDlg:AddObject( oImg ) oTBar := WvtToolbar():New( oDlg,103, 0,0,2 ) oTBar:lFloating := .f. - oTBar:Tooltip := 'Toolbar' - oTBar:AddButton( aImg_[ 1 ], {|| oImg:SetImage( aImg_[ 1 ] ) } , 'Lock' ) - oTBar:AddButton( aImg_[ 2 ], {|| oImg:SetImage( aImg_[ 2 ] ), oText:SetText( '(x)Harbour' ) } , 'New' ) - oTBar:AddButton( aImg_[ 3 ], {|| oImg:SetImage( aImg_[ 3 ] ) } , 'Calculator' ) + oTBar:Tooltip := "Toolbar" + oTBar:AddButton( aImg_[ 1 ], {|| oImg:SetImage( aImg_[ 1 ] ) } , "Lock" ) + oTBar:AddButton( aImg_[ 2 ], {|| oImg:SetImage( aImg_[ 2 ] ), oText:SetText( "(x)Harbour" ) } , "New" ) + oTBar:AddButton( aImg_[ 3 ], {|| oImg:SetImage( aImg_[ 3 ] ) } , "Calculator" ) oTBar:AddButton() - oTBar:AddButton( aImg_[ 5 ], {|| oImg:SetImage( aImg_[ 5 ] ) } , 'Restore' ) - oTBar:AddButton( aImg_[ 4 ], {|| oImg:SetImage( aImg_[ 4 ] ), oText:SetText( 'Vouch' ) } , 'Calendar' ) - oTBar:AddButton( aImg_[ 6 ], {|| oImg:SetImage( aImg_[ 6 ] ) } , 'Notes' ) - oTBar:AddButton( aImg_[ 7 ], {|| oImg:SetImage( aImg_[ 7 ] ) } , 'Press to Send Browse on Top' ) + oTBar:AddButton( aImg_[ 5 ], {|| oImg:SetImage( aImg_[ 5 ] ) } , "Restore" ) + oTBar:AddButton( aImg_[ 4 ], {|| oImg:SetImage( aImg_[ 4 ] ), oText:SetText( "Vouch" ) } , "Calendar" ) + oTBar:AddButton( aImg_[ 6 ], {|| oImg:SetImage( aImg_[ 6 ] ) } , "Notes" ) + oTBar:AddButton( aImg_[ 7 ], {|| oImg:SetImage( aImg_[ 7 ] ) } , "Press to Send Browse on Top" ) oTBar:AddButton() oDlg:AddObject( oTBar ) @@ -1390,31 +1390,31 @@ STATIC FUNCTION MyDialogOne() oDlg:AddObject( oBBox ) oBtn := WvtPushButton():New(oDlg, 124, 6, 129, 7, 137 ) - oBtn:cCaption := 'Print' + oBtn:cCaption := "Print" oBtn:bOnLeftUp := {|| Wvt_Keyboard( 379 ) } - oBtn:Tooltip := 'Open Printing Dialog for the Browser in Focus' + oBtn:Tooltip := "Open Printing Dialog for the Browser in Focus" oDlg:AddObject( oBtn ) oBtn2 := WvtPushButton():New( oDlg, 124, 9, 129, 12, 137 ) oBtn2:cFileImage := aImg_[ 3 ] oBtn2:block := {|| ExeProgressBar( oPBar2, oPBar3 ) } - oBtn2:Tooltip := 'Execute Progress Bar' + oBtn2:Tooltip := "Execute Progress Bar" oDlg:AddObject( oBtn2 ) oPBar2 := WvtProgressBar():New( oDlg, , 14, 129, 25, 137 ) oPBar2:nBarColor := RGB( 240,240,0 ) - oPBar2:cBackColor := 'W/N*' + oPBar2:cBackColor := "W/N*" oPBar2:lVertical := .t. oPBar2:nDirection := 0 - oPBar2:cImage := 'vouch1.bmp' + oPBar2:cImage := "vouch1.bmp" oDlg:AddObject( oPBar2 ) oPBar3 := WvtProgressBar():New( oDlg, , 26, 129, 36, 137 ) oPBar3:nBarColor := RGB( 240,240,0 ) - oPBar3:cBackColor := 'W/N*' + oPBar3:cBackColor := "W/N*" oPBar3:lVertical := .t. oPBar3:nDirection := 1 - oPBar3:cImage := 'vouch1.bmp' + oPBar3:cImage := "vouch1.bmp" oDlg:AddObject( oPBar3 ) oBBox2 := WvtStatic():New( oDlg, , 9, oDlg:MaxCol()-40, 18, oDlg:Maxcol()-2 ) @@ -1425,22 +1425,22 @@ STATIC FUNCTION MyDialogOne() oDlg:AddObject( oCon ) nGetCol := 158 - bBlock := {|| oCon:Say( 12, 148, 'Name' ,'N/W' ),; - oCon:Say( 14, 148, 'Date' ,'N/W' ),; - oCon:Say( 16, 148, 'Amount','N/W' ) } + bBlock := {|| oCon:Say( 12, 148, "Name" ,"N/W" ),; + oCon:Say( 14, 148, "Date" ,"N/W" ),; + oCon:Say( 16, 148, "Amount","N/W" ) } oGet := WvtGets():New( oDlg, 210, 9, oDlg:Maxcol()-40, 18, oDlg:Maxcol()-2 ) - oGet:AddGets( 12, nGetCol, 'GTWvt ', '@! ','W+/B*,N/W*' ) + oGet:AddGets( 12, nGetCol, "GTWvt ", "@! ","W+/B*,N/W*" ) oGet:AddGets( 14, nGetCol, date() ) - oGet:AddGets( 16, nGetCol, 2122.57, '@Z 99999999.99','w+/R,GR+/B' ) - oGet:Tooltip := 'WvtGets():New() - ReadModal() like Clipper' - oGet:cDesc := 'Normal Get Box' + oGet:AddGets( 16, nGetCol, 2122.57, "@Z 99999999.99","w+/R,GR+/B" ) + oGet:Tooltip := "WvtGets():New() - ReadModal() like Clipper" + oGet:cDesc := "Normal Get Box" oGet:bOnCreate := bBlock oDlg:AddObject( oGet ) oBnr := WvtBanner():New( oDlg, 101, 0, 127, 1, oDlg:MaxCol()-2 ) oBnr:nTimeDelay := 0.25 - oBnr:cText := 'the compiler that EXTENDS with you' + oBnr:cText := "the compiler that EXTENDS with you" oBnr:nFontHeight := 24 oBnr:nFontWeight := 0 oBnr:nDirection := 0 @@ -1449,7 +1449,7 @@ STATIC FUNCTION MyDialogOne() oBnr:nBackColor := RGB( 128,227,142 ) oBnr:nTextColorHoverOn := RGB( 255,255, 0 ) oBnr:nBackColorHoverOn := RGB( 255,100, 12 ) - oBnr:Tooltip := 'WvtBanner():New()' + oBnr:Tooltip := "WvtBanner():New()" oDlg:AddObject( oBnr ) oBRsd := WvtStatic():New( oDlg, , 41,127,52,oDlg:MaxCol()-2 ) @@ -1464,7 +1464,7 @@ STATIC FUNCTION MyDialogOne() oTBx := WvtTextBox():New( oDlg, , 42,129,51,oDlg:MaxCol()-4 ) oTBx:cText := cTxt - oTBx:Tooltip := 'WvtTextBox():New()' + oTBx:Tooltip := "WvtTextBox():New()" oTBx:nFontHeight := 16 oTBx:lItalic := .t. oTBx:lUnderline := .t. @@ -1472,8 +1472,8 @@ STATIC FUNCTION MyDialogOne() oTBx:nTextColor := RGB( 255,255,255 ) oTBx:nTextColorHoverOn := RGB( 0,0,255 ) oTBx:aPopup := {} - aadd( oTBx:aPopup, { 'Getsome' , {|| .t. } } ) - aadd( oTBx:aPopup, { 'Getsome2', {|| .t. } } ) + aadd( oTBx:aPopup, { "Getsome" , {|| .t. } } ) + aadd( oTBx:aPopup, { "Getsome2", {|| .t. } } ) oDlg:AddObject( oTBx ) oGetArea := WvtStatic():New( oDlg, , 4, 2, 37, 62 ) @@ -1483,66 +1483,66 @@ STATIC FUNCTION MyDialogOne() nGetCol := 20 nSayCol := 7 nGetRow := 7 - bBlock1 := {|| oCon:Say( nGetRow+00, nSayCol, 'First Name' ,'N/W' ),; - oCon:Say( nGetRow+02, nSayCol, 'Last Name ' ,'N/W' ),; - oCon:Say( nGetRow+04, nSayCol, 'Street' ,'N/W' ),; - oCon:Say( nGetRow+06, nSayCol, 'City' ,'W+/W'),; - oCon:Say( nGetRow+08, nSayCol, 'State' ,'N/W' ),; - oCon:Say( nGetRow+10, nSayCol, 'Zip' ,'B+/W'),; - oCon:Say( nGetRow+12, nSayCol, 'Date Hired' ,'B+/W'),; - oCon:Say( nGetRow+14, nSayCol, 'Married' ,'B+/W'),; - oCon:Say( nGetRow+16, nSayCol, 'Age' ,'B+/W'),; - oCon:Say( nGetRow+18, nSayCol, 'Salary' ,'B+/W'),; - oCon:Say( nGetRow+20, nSayCol, 'Notes', ,'B+/W') ; + bBlock1 := {|| oCon:Say( nGetRow+00, nSayCol, "First Name" ,"N/W" ),; + oCon:Say( nGetRow+02, nSayCol, "Last Name " ,"N/W" ),; + oCon:Say( nGetRow+04, nSayCol, "Street" ,"N/W" ),; + oCon:Say( nGetRow+06, nSayCol, "City" ,"W+/W"),; + oCon:Say( nGetRow+08, nSayCol, "State" ,"N/W" ),; + oCon:Say( nGetRow+10, nSayCol, "Zip" ,"B+/W"),; + oCon:Say( nGetRow+12, nSayCol, "Date Hired" ,"B+/W"),; + oCon:Say( nGetRow+14, nSayCol, "Married" ,"B+/W"),; + oCon:Say( nGetRow+16, nSayCol, "Age" ,"B+/W"),; + oCon:Say( nGetRow+18, nSayCol, "Salary" ,"B+/W"),; + oCon:Say( nGetRow+20, nSayCol, "Notes", ,"B+/W") ; } - aGets_:= { pad('Pritpal',20 ), pad( 'Bedi',20 ), pad( '60, New Professor Colony',30 ), ; - pad( 'Ludhiana, INDIA',30 ),; - 'PB', pad( '141004',10 ), ctod( '22/06/04' ), .t., 48, 17000, ; - pad( 'Wvtgui is a classical example of (x)Harbour capabilities...',65 ) } + aGets_:= { pad("Pritpal",20 ), pad( "Bedi",20 ), pad( "60, New Professor Colony",30 ), ; + pad( "Ludhiana, INDIA",30 ),; + "PB", pad( "141004",10 ), ctod( "22/06/04" ), .t., 48, 17000, ; + pad( "Wvtgui is a classical example of (x)Harbour capabilities...",65 ) } oGet1 := WvtGets():New( oDlg, , 4, 2, 37, 62 ) - oGet1:AddGets( nGetRow+00, nGetCol, aGets_[ 1 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+02, nGetCol, aGets_[ 2 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+04, nGetCol, aGets_[ 3 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+06, nGetCol, aGets_[ 4 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+08, nGetCol, aGets_[ 5 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+10, nGetCol, aGets_[ 6 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+12, nGetCol, aGets_[ 7 ], '@ ' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+14, nGetCol, aGets_[ 8 ], '@Y' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+16, nGetCol, aGets_[ 9 ], '@Z 99' , 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+18, nGetCol, aGets_[ 10], '@Z 999999', 'N/W*,N/GR*' ) - oGet1:AddGets( nGetRow+20, nGetCol, aGets_[ 11], '@S35' , 'N/W*,N/GR*' ) - oGet1:cDesc := 'Test.dbf Fields' - oGet1:Tooltip := 'Double Click to Activate ReadModal()' + oGet1:AddGets( nGetRow+00, nGetCol, aGets_[ 1 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+02, nGetCol, aGets_[ 2 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+04, nGetCol, aGets_[ 3 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+06, nGetCol, aGets_[ 4 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+08, nGetCol, aGets_[ 5 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+10, nGetCol, aGets_[ 6 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+12, nGetCol, aGets_[ 7 ], "@ " , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+14, nGetCol, aGets_[ 8 ], "@Y" , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+16, nGetCol, aGets_[ 9 ], "@Z 99" , "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+18, nGetCol, aGets_[ 10], "@Z 999999", "N/W*,N/GR*" ) + oGet1:AddGets( nGetRow+20, nGetCol, aGets_[ 11], "@S35" , "N/W*,N/GR*" ) + oGet1:cDesc := "test.dbf Fields" + oGet1:Tooltip := "Double Click to Activate ReadModal()" oGet1:bOnCreate := bBlock1 oDlg:AddObject( oGet1 ) g_oMenuBar := WvtMenu():new():create() oMenu := WvtMenu():new():create() - oMenu:Caption := 'Other Dialogs' - oMenu:AddItem( 'Dialog Two', {|| MyDialogTwo() } ) - oMenu:AddItem( '-' ) - oMenu:AddItem( 'Exit', {|| Wvt_Keyboard( K_ESC ) } ) + oMenu:Caption := "Other Dialogs" + oMenu:AddItem( "Dialog Two", {|| MyDialogTwo() } ) + oMenu:AddItem( "-" ) + oMenu:AddItem( "Exit", {|| Wvt_Keyboard( K_ESC ) } ) g_oMenuBar:addItem( "",oMenu ) oDlg:oMenu := g_oMenuBar lOpen := .f. - cUseAlias := 'TEST' - USE 'TEST' NEW ALIAS ( cUseAlias ) SHARED + cUseAlias := "TEST" + USE "test" NEW ALIAS ( cUseAlias ) SHARED if !NetErr() lOpen := .t. - oWvtBrw := CfgMyBrowse( { 1,7,9,10,8 }, cUseAlias, { 6,67,36,120 }, 'Test.dbf - 1,7,9,10,8', oDlg, 'N/W*,N/GR*',1001 ) + oWvtBrw := CfgMyBrowse( { 1,7,9,10,8 }, cUseAlias, { 6,67,36,120 }, "test.dbf - 1,7,9,10,8", oDlg, "N/W*,N/GR*",1001 ) oDlg:AddObject( oWvtBrw ) endif lOpen1 := .f. - cUseAlias1 := 'TEST1' - USE 'TEST' NEW ALIAS ( cUseAlias1 ) SHARED + cUseAlias1 := "TEST1" + USE "test" NEW ALIAS ( cUseAlias1 ) SHARED if !NetErr() lOpen1 := .t. - oWvtBrw1 := CfgMyBrowse( { 1,2,3,4,5,6 }, cUseAlias1, { 43,4,51,120 }, 'Test.dbf - 1,2,3,4,5,6',oDlg, 'N/BG*,N/W*',1002 ) + oWvtBrw1 := CfgMyBrowse( { 1,2,3,4,5,6 }, cUseAlias1, { 43,4,51,120 }, "test.dbf - 1,2,3,4,5,6",oDlg, "N/BG*,N/W*",1002 ) oDlg:AddObject( oWvtBrw1 ) endif @@ -1570,51 +1570,51 @@ STATIC FUNCTION MyDialogOne() STATIC FUNCTION MyDialogTwo() LOCAL aObjects := WvtSetBlocks( {} ) - LOCAL oDlg := WvtDialog():New( 30,90,'My Dialog Two' ) + LOCAL oDlg := WvtDialog():New( 30,90,"My Dialog Two" ) LOCAL g_oMenuBar, oMenu, oPBar LOCAL oPBar1, oPBar2, oPBar3, oPBar4 g_oMenuBar := WvtMenu():new():create() oMenu := wvtMenu():new():create() - oMenu:Caption := 'Miscellaneous' - oMenu:AddItem( 'Progressbar', {|| ExeProgBar( oPBar,oPBar1,oPBar2,oPBar3, oPBar4 ) } ) - oMenu:AddItem( '-' ) - oMenu:AddItem( 'Exit', {|| Wvt_Keyboard( K_ESC ) } ) + oMenu:Caption := "Miscellaneous" + oMenu:AddItem( "Progressbar", {|| ExeProgBar( oPBar,oPBar1,oPBar2,oPBar3, oPBar4 ) } ) + oMenu:AddItem( "-" ) + oMenu:AddItem( "Exit", {|| Wvt_Keyboard( K_ESC ) } ) g_oMenuBar:addItem( "",oMenu ) oDlg:oMenu := g_oMenuBar oPBar := WvtProgressBar():New( oDlg, , 3, 10, 5, 80 ) oPBar:nBarColor := RGB( 0,240,240 ) - oPBar:cBackColor := 'W/N*' + oPBar:cBackColor := "W/N*" oPBar:nDirection := 1 - oPBar:cImage := 'vouch1.bmp' + oPBar:cImage := "vouch1.bmp" oDlg:AddObject( oPBar ) oPBar1 := WvtProgressBar():New( oDlg, , 7, 10, 8, 80 ) oPBar1:nBarColor := RGB( 11,255,196 ) - oPBar1:cBackColor := 'W/N*' + oPBar1:cBackColor := "W/N*" oPBar1:nDirection := 0 oDlg:AddObject( oPBar1 ) oPBar2 := WvtProgressBar():New( oDlg, , 11, 10, 28, 19 ) oPBar2:nBarColor := RGB( 240,240,0 ) - oPBar2:cBackColor := 'W/N*' + oPBar2:cBackColor := "W/N*" oPBar2:lVertical := .t. oPBar2:nDirection := 0 - oPBar2:cImage := 'v_notes.ico' + oPBar2:cImage := "v_notes.ico" oDlg:AddObject( oPBar2 ) oPBar3 := WvtProgressBar():New( oDlg, , 11, 77, 28, 80 ) oPBar3:nBarColor := RGB( 0,0,255 ) - oPBar3:cBackColor := 'W/N*' + oPBar3:cBackColor := "W/N*" oPBar3:lVertical := .t. oPBar3:nDirection := 1 oDlg:AddObject( oPBar3 ) oPBar4 := WvtProgressBar():New( oDlg, , 22, 22, 28, 74 ) oPBar4:nBarColor := RGB( 255,255,0 ) - oPBar4:cBackColor := 'W/N*' + oPBar4:cBackColor := "W/N*" oPBar4:lVertical := .t. oPBar4:nDirection := 0 oDlg:AddObject( oPBar4 ) @@ -1682,18 +1682,18 @@ Function DynDialog_1() + WS_THICKFRAME + WS_VISIBLE + WS_POPUP aDlg := Wvt_MakeDlgTemplate( 1, 2, 15, 40, {0,0,0,0}, ; - ltrim( str( nInfo,10,0 ) ) + ' - Modeless Dialog', nStyle ) + ltrim( str( nInfo,10,0 ) ) + " - Modeless Dialog", nStyle ) nStyle := WS_VISIBLE + WS_TABSTOP + ES_AUTOVSCROLL + ES_MULTILINE + ES_WANTRETURN + WS_BORDER + WS_VSCROLL - aDlg := Wvt_AddDlgItem( aDlg, 1, 2, 9, 28, {}, 10, 'EDIT' , nStyle, /* cText, nHelpId, nExStyle */ ) + aDlg := Wvt_AddDlgItem( aDlg, 1, 2, 9, 28, {}, 10, "EDIT" , nStyle, /* cText, nHelpId, nExStyle */ ) nStyle := WS_VISIBLE + SS_ETCHEDHORZ - aDlg := Wvt_AddDlgItem( aDlg, 12, 2, 1, 36, {}, 12, 'STATIC', nStyle ) + aDlg := Wvt_AddDlgItem( aDlg, 12, 2, 1, 36, {}, 12, "STATIC", nStyle ) nStyle := WS_VISIBLE + WS_TABSTOP + BS_AUTOCHECKBOX - aDlg := Wvt_AddDlgItem( aDlg, 13, 2, 1, 10, {}, 11, 'BUTTON', nStyle, 'Is It Checked?' ) + aDlg := Wvt_AddDlgItem( aDlg, 13, 2, 1, 10, {}, 11, "BUTTON", nStyle, "Is It Checked?" ) - hDlg := Wvt_CreateDialog( aDlg, .f., 'DynDlgProc_1' ) + hDlg := Wvt_CreateDialog( aDlg, .f., "DynDlgProc_1" ) Return hDlg @@ -1705,7 +1705,7 @@ Function DynDlgProc_1( hDlg, nMsg, wParam, lParam ) Switch ( nMsg ) case WM_INITDIALOG - Win_SetDlgItemText( hDlg, 10, 'This is multiline text which will be displayed in the edit window!' ) + Win_SetDlgItemText( hDlg, 10, "This is multiline text which will be displayed in the edit window!" ) Win_CheckDlgButton( hDlg, 11, .t. ) exit @@ -1727,7 +1727,7 @@ Function DynDlgProc_1( hDlg, nMsg, wParam, lParam ) case wParam == 11 lClicked := ( Win_IsDlgButtonChecked( hDlg,11 ) == 1 ) - Win_MessageBox( hDlg, 'Button ' + iif( lClicked, 'Clicked', 'Unclicked' ), 'CheckBoxStatus' ) + Win_MessageBox( hDlg, "Button " + iif( lClicked, "Clicked", "Unclicked" ), "CheckBoxStatus" ) endcase exit @@ -1769,72 +1769,72 @@ Function DynDialog_2() nStyle := DS_SETFONT + WS_VISIBLE + WS_POPUP + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX aDlg := Wvt_MakeDlgTemplate( 1, 4, 21, 60, {0,0,0,0}, ; - 'Dialog First [ ' + ltrim( str( nInfo,10,0 ) ) + ' ] '+; - iif( nInfo%2==0, 'Modeless', 'Modal' ),' Dialog !', nStyle ) + "Dialog First [ " + ltrim( str( nInfo,10,0 ) ) + " ] "+; + iif( nInfo%2==0, "Modeless", "Modal" )," Dialog !", nStyle ) // Multi line edit control // nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + ES_AUTOVSCROLL + ES_MULTILINE + ; ES_WANTRETURN + WS_BORDER + WS_VSCROLL - aDlg := Wvt_AddDlgItem( aDlg, 1, 2, 15, 35, {}, ID_MLE , 'EDIT' , nStyle, /* cText, nHelpId, nExStyle */ ) + aDlg := Wvt_AddDlgItem( aDlg, 1, 2, 15, 35, {}, ID_MLE , "EDIT" , nStyle, /* cText, nHelpId, nExStyle */ ) // Two Horz and Vert Lines // nStyle := WS_CHILD + WS_VISIBLE + SS_ETCHEDVERT - aDlg := Wvt_AddDlgItem( aDlg, 1, 39, 16, 1, {}, 111 , 'STATIC' , nStyle ) + aDlg := Wvt_AddDlgItem( aDlg, 1, 39, 16, 1, {}, 111 , "STATIC" , nStyle ) nStyle := WS_CHILD + WS_VISIBLE + SS_ETCHEDHORZ - aDlg := Wvt_AddDlgItem( aDlg, 17, 2, 1, 56, {}, 112 , 'STATIC' , nStyle ) + aDlg := Wvt_AddDlgItem( aDlg, 17, 2, 1, 56, {}, 112 , "STATIC" , nStyle ) // Icon nStyle := WS_CHILD + WS_VISIBLE + SS_ICON //+ SS_CENTERIMAGE - aDlg := Wvt_AddDlgItem( aDlg, 18, 2, 2, 6, {}, ID_ICO_VOUCH , 'STATIC' , nStyle, '' ) + aDlg := Wvt_AddDlgItem( aDlg, 18, 2, 2, 6, {}, ID_ICO_VOUCH , "STATIC" , nStyle, "" ) /* // Bitmap nStyle := WS_CHILD + WS_VISIBLE + SS_BITMAP + SS_REALSIZEIMAGE - aDlg := Wvt_AddDlgItem( aDlg, 18, 41, 2,8, {-3,0,3}, ID_STA_IMAGE, 'STATIC' , nStyle, '' ) + aDlg := Wvt_AddDlgItem( aDlg, 18, 41, 2,8, {-3,0,3}, ID_STA_IMAGE, "STATIC" , nStyle, "" ) */ nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + BS_AUTOCHECKBOX - aDlg := Wvt_AddDlgItem( aDlg, 18, 15, 1, 10, {}, ID_CHK_SATIS , 'BUTTON' , nStyle, 'Satisfied?' ) + aDlg := Wvt_AddDlgItem( aDlg, 18, 15, 1, 10, {}, ID_CHK_SATIS , "BUTTON" , nStyle, "Satisfied?" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + ES_RIGHT + ES_READONLY - aDlg := Wvt_AddDlgItem( aDlg, 18, 30, 1, 7, {3}, ID_EDT_TIME , 'EDIT' , nStyle, '' ) + aDlg := Wvt_AddDlgItem( aDlg, 18, 30, 1, 7, {3}, ID_EDT_TIME , "EDIT" , nStyle, "" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + LBS_NOTIFY + WS_VSCROLL + WS_BORDER - aDlg := Wvt_AddDlgItem( aDlg, 1, 41, 4, 17, {}, ID_LST_LIST , 'LISTBOX', nStyle, 'ListBox' ) + aDlg := Wvt_AddDlgItem( aDlg, 1, 41, 4, 17, {}, ID_LST_LIST , "LISTBOX", nStyle, "ListBox" ) nStyle := WS_CHILD + WS_VISIBLE + SS_LEFT - aDlg := Wvt_AddDlgItem( aDlg, 4, 41, 1, 17, {3,0,0,0}, -1 , 'STATIC' , nStyle, 'Degree' ) + aDlg := Wvt_AddDlgItem( aDlg, 4, 41, 1, 17, {3,0,0,0}, -1 , "STATIC" , nStyle, "Degree" ) nStyle := WS_VISIBLE + WS_TABSTOP + CBS_DROPDOWNLIST + WS_BORDER + WS_VSCROLL - aDlg := Wvt_AddDlgItem( aDlg, 5, 41, 6, 17, {}, ID_CMB_COMBO , 'COMBOBOX' , nStyle, 'Combo' ) + aDlg := Wvt_AddDlgItem( aDlg, 5, 41, 6, 17, {}, ID_CMB_COMBO , "COMBOBOX" , nStyle, "Combo" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + BS_GROUPBOX - aDlg := Wvt_AddDlgItem( aDlg, 7, 41, 4, 17, {0,0,4,0},ID_GRP_COMP, 'BUTTON' , nStyle, 'Compiler' ) + aDlg := Wvt_AddDlgItem( aDlg, 7, 41, 4, 17, {0,0,4,0},ID_GRP_COMP, "BUTTON" , nStyle, "Compiler" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + BS_AUTORADIOBUTTON - aDlg := Wvt_AddDlgItem( aDlg, 8, 43, 1, 14, {}, ID_RDO_XH , 'BUTTON' , nStyle, '(x)Harbour' ) - aDlg := Wvt_AddDlgItem( aDlg, 9, 43, 1, 14, {}, ID_RDO_CLIP , 'BUTTON' , nStyle, 'Clipper' ) - aDlg := Wvt_AddDlgItem( aDlg,10, 43, 1, 14, {}, ID_RDO_XBASE , 'BUTTON' , nStyle, 'Xbase++' ) + aDlg := Wvt_AddDlgItem( aDlg, 8, 43, 1, 14, {}, ID_RDO_XH , "BUTTON" , nStyle, "(x)Harbour" ) + aDlg := Wvt_AddDlgItem( aDlg, 9, 43, 1, 14, {}, ID_RDO_CLIP , "BUTTON" , nStyle, "Clipper" ) + aDlg := Wvt_AddDlgItem( aDlg,10, 43, 1, 14, {}, ID_RDO_XBASE , "BUTTON" , nStyle, "Xbase++" ) nStyle := WS_CHILD + WS_VISIBLE + SS_LEFT - aDlg := Wvt_AddDlgItem( aDlg, 12, 41, 1, 17, {3,0,0,0}, ID_STA_TEXT, 'STATIC' , nStyle, 'Scrollable Text' ) + aDlg := Wvt_AddDlgItem( aDlg, 12, 41, 1, 17, {3,0,0,0}, ID_STA_TEXT, "STATIC" , nStyle, "Scrollable Text" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + ES_AUTOHSCROLL + WS_BORDER - aDlg := Wvt_AddDlgItem( aDlg, 13, 41, 1, 17, {}, ID_EDT_TEXT , 'EDIT' , nStyle, 'This is Text Field' ) + aDlg := Wvt_AddDlgItem( aDlg, 13, 41, 1, 17, {}, ID_EDT_TEXT , "EDIT" , nStyle, "This is Text Field" ) nStyle := WS_CHILD + WS_VISIBLE + SS_LEFT - aDlg := Wvt_AddDlgItem( aDlg, 14, 41, 1, 17, {3,0,0,0}, -1, 'STATIC' , nStyle, 'Right Justified Numerics' ) + aDlg := Wvt_AddDlgItem( aDlg, 14, 41, 1, 17, {3,0,0,0}, -1, "STATIC" , nStyle, "Right Justified Numerics" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + ES_AUTOHSCROLL + ES_NUMBER + ES_RIGHT + WS_BORDER - aDlg := Wvt_AddDlgItem( aDlg, 15, 41, 1, 17, {}, ID_EDT_NUMB , 'EDIT' , nStyle, '1234567' ) + aDlg := Wvt_AddDlgItem( aDlg, 15, 41, 1, 17, {}, ID_EDT_NUMB , "EDIT" , nStyle, "1234567" ) nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + BS_PUSHBUTTON - aDlg := Wvt_AddDlgItem( aDlg, 18, 50, 1, 8, {-3,0,3,0}, ID_BTN_OK, 'BUTTON' , nStyle, 'OK' ) + aDlg := Wvt_AddDlgItem( aDlg, 18, 50, 1, 8, {-3,0,3,0}, ID_BTN_OK, "BUTTON" , nStyle, "OK" ) hMenu := Wvt_CreateMenu() - Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_FILE , 'File' ) - Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_CONTROL, 'Controls' ) + Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_FILE , "File" ) + Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_CONTROL, "Controls" ) lOnTop := .f. - cDlgProc := 'DynDlgProc_2' + cDlgProc := "DynDlgProc_2" bDlgProc := {|a,b,c,d| DYNDLGPROC_2(a,b,c,d) } - cDlgIcon := 'v_notes.ico' + cDlgIcon := "v_notes.ico" nTimerTicks := 1000 // 1 second if nInfo % 2 == 1 @@ -1869,29 +1869,29 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) case wParam == ID_CHK_SATIS lClicked := ( Win_IsDlgButtonChecked( hDlg,ID_CHK_SATIS ) == 1 ) - Win_MessageBox( hDlg, iif( lClicked, 'Satisfied', 'UnSatisfied' ), 'CheckBoxStatus' ) + Win_MessageBox( hDlg, iif( lClicked, "Satisfied", "UnSatisfied" ), "CheckBoxStatus" ) case wParam == ID_RDO_XH - Win_MessageBox( hDlg, '(x)Harbour', 'Compiler' ) + Win_MessageBox( hDlg, "(x)Harbour", "Compiler" ) case wParam == ID_RDO_CLIP - Win_MessageBox( hDlg, 'Clipper', 'Compiler' ) + Win_MessageBox( hDlg, "Clipper", "Compiler" ) case wParam == ID_RDO_XBASE - Win_MessageBox( hDlg, 'Xbase++', 'Compiler' ) + Win_MessageBox( hDlg, "Xbase++", "Compiler" ) case wParam == ID_MNU_FILE - Win_MessageBox( hDlg, 'Execute Menu Action!', 'File' ) + Win_MessageBox( hDlg, "Execute Menu Action!", "File" ) case wParam == ID_MNU_CONTROL - Win_MessageBox( hDlg, 'Controls are from Windows!', 'Controls' ) + Win_MessageBox( hDlg, "Controls are from Windows!", "Controls" ) case Win_LoWord( wParam ) == ID_LST_LIST if Win_HiWord( wParam ) == LBN_SELCHANGE nIndex := Win_SendMessage( Win_GetDlgItem( hDlg, ID_LST_LIST ), LB_GETCURSEL, 0, 0 ) cPrompt := space( 20 ) Win_SendMessage( Win_GetDlgItem( hDlg, ID_LST_LIST ), LB_GETTEXT, nIndex, @cPrompt ) - Win_MessageBox( hDlg, cPrompt, 'ListBox' ) + Win_MessageBox( hDlg, cPrompt, "ListBox" ) endif case Win_LoWord( wParam ) == ID_CMB_COMBO @@ -1899,7 +1899,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) nIndex := Win_SendMessage( Win_GetDlgItem( hDlg, ID_CMB_COMBO ), CB_GETCURSEL, 0, 0 ) cPrompt := space( 20 ) Win_SendMessage( Win_GetDlgItem( hDlg, ID_CMB_COMBO ), CB_GETLBTEXT, nIndex, @cPrompt ) - Win_MessageBox( hDlg, cPrompt, 'Combo Box' ) + Win_MessageBox( hDlg, cPrompt, "Combo Box" ) endif endcase @@ -1939,7 +1939,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) endif if shIcon == nil - shIcon := Win_LoadIcon( 'vr_1.ico' ) + shIcon := Win_LoadIcon( "vr_1.ico" ) endif if shIcon != nil .or. shIcon != 0 Win_SendMessage( Win_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, shIcon ) @@ -1947,7 +1947,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) /* if shImage == nil - shImage := Win_LoadImage( 'vouch1.bmp', 2 ) + shImage := Win_LoadImage( "vouch1.bmp", 2 ) endif if shImage != nil .and. shImage != 0 Win_SendMessage( Win_GetDlgItem( hDlg, ID_STA_IMAGE ), STM_SETIMAGE, IMAGE_BITMAP, shImage ) @@ -1958,20 +1958,20 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) Win_CheckRadioButton( hDlg, ID_RDO_XH, ID_RDO_XBASE, ID_RDO_XH ) - Wvt_LBAddString( hDlg, ID_LST_LIST, '(x)Harbour' ) - Wvt_LBAddString( hDlg, ID_LST_LIST, 'Gtwvt' ) - Wvt_LBAddString( hDlg, ID_LST_LIST, 'Wvtgui' ) - Wvt_LBAddString( hDlg, ID_LST_LIST, 'Modeless' ) - Wvt_LBAddString( hDlg, ID_LST_LIST, 'Dialogs' ) - Wvt_LBAddString( hDlg, ID_LST_LIST, 'WVT' ) + Wvt_LBAddString( hDlg, ID_LST_LIST, "(x)Harbour" ) + Wvt_LBAddString( hDlg, ID_LST_LIST, "Gtwvt" ) + Wvt_LBAddString( hDlg, ID_LST_LIST, "Wvtgui" ) + Wvt_LBAddString( hDlg, ID_LST_LIST, "Modeless" ) + Wvt_LBAddString( hDlg, ID_LST_LIST, "Dialogs" ) + Wvt_LBAddString( hDlg, ID_LST_LIST, "WVT" ) Wvt_LBSetCurSel( hDlg, ID_LST_LIST, 1 ) - Wvt_CBAddString( hDlg, ID_CMB_COMBO, 'First' ) - Wvt_CBAddString( hDlg, ID_CMB_COMBO, 'Second' ) - Wvt_CBAddString( hDlg, ID_CMB_COMBO, 'Third' ) - Wvt_CBAddString( hDlg, ID_CMB_COMBO, 'Fourth' ) - Wvt_CBAddString( hDlg, ID_CMB_COMBO, 'Fifth' ) + Wvt_CBAddString( hDlg, ID_CMB_COMBO, "First" ) + Wvt_CBAddString( hDlg, ID_CMB_COMBO, "Second" ) + Wvt_CBAddString( hDlg, ID_CMB_COMBO, "Third" ) + Wvt_CBAddString( hDlg, ID_CMB_COMBO, "Fourth" ) + Wvt_CBAddString( hDlg, ID_CMB_COMBO, "Fifth" ) Wvt_CBSetCurSel( hDlg, ID_CMB_COMBO, 1 ) @@ -1994,32 +1994,32 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) //-------------------------------------------------------------------// static function GetEditText() - Local cText := '' + Local cText := "" - cText += 'Welcome in the Wonderful World of (x)Harbour!' + cText += "Welcome in the Wonderful World of (x)Harbour!" cText += CRLF + CRLF - cText += 'When Peter Rees first published GTWVT, a Windows ' - cText += 'Terminal Driver, on 22 Dec 2003, everybody took it ' - cText += 'lightly, except for me, as I was aware that what ' - cText += 'wonderful contribution to (x)Harbour he has made, ' - cText += 'what immense possibilities he has opened for (x)Harbour ' - cText += 'developers, what limitations he has cleared for Clipper ' - cText += 'savvy user base.' + cText += "When Peter Rees first published GTWVT, a Windows " + cText += "Terminal Driver, on 22 Dec 2003, everybody took it " + cText += "lightly, except for me, as I was aware that what " + cText += "wonderful contribution to (x)Harbour he has made, " + cText += "what immense possibilities he has opened for (x)Harbour " + cText += "developers, what limitations he has cleared for Clipper " + cText += "savvy user base." cText += CRLF + CRLF - cText += 'With a little effort I could extend GTWVT ' - cText += 'to give it a GUI look. I also tried to give it ' - cText += 'an event driven functionality, and up came Wvt*Classes.' + cText += "With a little effort I could extend GTWVT " + cText += "to give it a GUI look. I also tried to give it " + cText += "an event driven functionality, and up came Wvt*Classes." cText += CRLF + CRLF - cText += 'And yet another feather is added in the cap of GTWVT ' - cText += 'as it is now capable of firing modeless dialogs like the one ' - cText += 'you are viewing. These dialogs can be constructed dynamically ( Courtesy What32 ) ' - cText += 'at run time or can be one of resources. At present 20 such dialogs ' - cText += 'can be active at any given time. Also note that dialogs created ' - cText += 'dynamically respect Top, Left, Rows, Cols coordinates, which is an ' - cText += 'undisputed productivity boost!' + cText += "And yet another feather is added in the cap of GTWVT " + cText += "as it is now capable of firing modeless dialogs like the one " + cText += "you are viewing. These dialogs can be constructed dynamically ( Courtesy hbwhat32 ) " + cText += "at run time or can be one of resources. At present 20 such dialogs " + cText += "can be active at any given time. Also note that dialogs created " + cText += "dynamically respect Top, Left, Rows, Cols coordinates, which is an " + cText += "undisputed productivity boost!" cText += CRLF + CRLF - cText += 'Enjoy!' + CRLF - cText += 'Pritpal Bedi, INDIA' + cText += "Enjoy!" + CRLF + cText += "Pritpal Bedi, INDIA" Return cText @@ -2047,13 +2047,13 @@ EXIT PROCEDURE CleanHandles() FUNCTION DlgSlideShow() LOCAL hDlg, aDlg, nStyle - aSlides := { 'vouch1.bmp', 'v_notes.ico', '2000.gif', 'v_lock.bmp', 'v_help.ico' } + aSlides := { "vouch1.bmp", "v_notes.ico", "2000.gif", "v_lock.bmp", "v_help.ico" } nStyle := DS_SETFONT + WS_VISIBLE + WS_POPUP + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX - aDlg := Wvt_MakeDlgTemplate( 0, 0, 20, 40, {}, 'Slide Show', nStyle ) + aDlg := Wvt_MakeDlgTemplate( 0, 0, 20, 40, {}, "Slide Show", nStyle ) - hDlg := Wvt_CreateDialog( aDlg, .f., 'DlgSlideShowProc', 'vr_1.ico', 5000 ) + hDlg := Wvt_CreateDialog( aDlg, .f., "DlgSlideShowProc", "vr_1.ico", 5000 ) Return hDlg @@ -2103,4 +2103,3 @@ FUNCTION DrawSlide( hDlg, nSlide ) Return nil //----------------------------------------------------------------------// - diff --git a/harbour/contrib/gtwvg/wvgclass.prg b/harbour/contrib/gtwvg/wvgclass.prg index cf9f6ff3c7..182af5b8ec 100644 --- a/harbour/contrib/gtwvg/wvgclass.prg +++ b/harbour/contrib/gtwvg/wvgclass.prg @@ -66,13 +66,13 @@ //-------------------------------------------------------------------// //-------------------------------------------------------------------// -#include 'hbclass.ch' -#include 'inkey.ch' -#include 'common.ch' -#include 'setcurs.ch' +#include "hbclass.ch" +#include "inkey.ch" +#include "common.ch" +#include "setcurs.ch" -#include 'wvtwin.ch' -//#include 'xhb.ch' +#include "wvtwin.ch" +//#include "xhb.ch" //-------------------------------------------------------------------// diff --git a/harbour/contrib/gtwvg/wvgpaint.prg b/harbour/contrib/gtwvg/wvgpaint.prg index 30087524e1..070eb3ac19 100644 --- a/harbour/contrib/gtwvg/wvgpaint.prg +++ b/harbour/contrib/gtwvg/wvgpaint.prg @@ -59,8 +59,8 @@ //-------------------------------------------------------------------// //-------------------------------------------------------------------// -#include 'wvtwin.ch' -#include 'common.ch' +#include "wvtwin.ch" +#include "common.ch" //-------------------------------------------------------------------// diff --git a/harbour/contrib/hbapollo/tests/apollo.prg b/harbour/contrib/hbapollo/tests/apollo.prg index f0a3b426fe..0c9e4f3b55 100644 --- a/harbour/contrib/hbapollo/tests/apollo.prg +++ b/harbour/contrib/hbapollo/tests/apollo.prg @@ -50,18 +50,19 @@ * */ -#include "Apollo.ch" +#include "apollo.ch" -Function Main() -LOCAL nAlias,f +FUNCTION Main() +LOCAL nAlias +LOCAL f SET DATE FRENCH SET CENTURY ON sx_SetMemoBlockSize( 32 ) sx_SetDateFormat( SX_FRENCH ) - sx_SetCentury( .t. ) + sx_SetCentury( .T. ) ? "Apollo version " + sx_Version() @@ -74,11 +75,11 @@ LOCAL nAlias,f ? "" ? "Creating a new database file.." - nAlias:=sx_CreateNew("test.dbf",; // full path filename - "test1",; // Alias - SX_SDENSX,; // rdeType - 6) // Maximum fields added by sx_CreateField - IF nAlias=0 + nAlias := sx_CreateNew("test.dbf",; // full path filename + "test1",; // Alias + SX_SDENSX,; // rdeType + 6) // Maximum fields added by sx_CreateField + IF nAlias == 0 ? "Error creating database" RETU NIL ENDIF @@ -94,21 +95,21 @@ LOCAL nAlias,f sx_Close() ?? "OK!" - nAlias:=sx_Use("test.dbf","test2",SX_EXCLUSIVE,SX_SDENSX) + nAlias := sx_Use("test.dbf","test2",SX_EXCLUSIVE,SX_SDENSX) sx_Zap() - IF Valtype(nAlias)="N" .AND. nAlias # 0 + IF Valtype(nAlias) == "N" .AND. nAlias != 0 ? "OK opening 'test.dbf'" ? "Adding 1000 records..." - FOR f=1 to 1000 + FOR f := 1 to 1000 sx_AppendBlank() sx_Replace("FIRST" , SX_R_CHAR , "Patrick " + Str( f ) ) sx_Replace("LAST" , SX_R_CHAR , LTrim( Str( f ) ) + " Mast" ) sx_Replace("NOTES" , SX_R_MEMO , "This is record " + LTrim( Str( f ) ) ) sx_Replace("AGE" , SX_R_DOUBLE , f ) sx_Replace("BIRTDATE" , SX_R_DATESTR, DtoC( Date() ) ) - *sx_Replace("MARRIED" , SX_R_LOGICAL, If(f%5=2,1,0) ) /* Logical does not work yet.. */ + // sx_Replace("MARRIED" , SX_R_LOGICAL, If(f%5==2,1,0) ) /* Logical does not work yet.. */ sx_Commit() NEXT @@ -131,7 +132,7 @@ LOCAL nAlias,f ? "" sx_GoTop() - sx_SetSoftSeek( .f. ) // SetSoftSeek OFF + sx_SetSoftSeek( .F. ) // SetSoftSeek OFF IF sx_Seek( "928 Mast" ) ? "String '928 Mast' found in record number "+ LTrim( Str( sx_RecNo() ) ) ELSE @@ -154,4 +155,4 @@ LOCAL nAlias,f ? "ERROR Opening 'test.dbf'" ENDIF -return \ No newline at end of file +return diff --git a/harbour/contrib/hbclipsm/tests/testgaug.prg b/harbour/contrib/hbclipsm/tests/testgaug.prg index fc313ea157..8a833f9018 100644 --- a/harbour/contrib/hbclipsm/tests/testgaug.prg +++ b/harbour/contrib/hbclipsm/tests/testgaug.prg @@ -4,8 +4,8 @@ /* Testing Harbour's Gauge */ -#include "Inkey.ch" -#include "SetCurs.ch" +#include "inkey.ch" +#include "setcurs.ch" function Test() diff --git a/harbour/contrib/hbct/numconv.prg b/harbour/contrib/hbct/numconv.prg index 6b03a80e2d..d7ad76b7fe 100644 --- a/harbour/contrib/hbct/numconv.prg +++ b/harbour/contrib/hbct/numconv.prg @@ -148,7 +148,7 @@ IF ISCHARACTER(xNum) .and. nBase >= 2 .and. nBase <= 36 xNum := UPPER( ALLTRIM( xNum) ) - FOR i=1 TO LEN( xNum ) + FOR i := 1 TO LEN( xNum ) nPos := AT( SUBSTR( xNum, i, 1 ), WORLD ) IF nPos == 0 .or. nPos > nBase EXIT diff --git a/harbour/contrib/hbct/tests/expomant.prg b/harbour/contrib/hbct/tests/expomant.prg index 5d18c0678f..b37799455e 100644 --- a/harbour/contrib/hbct/tests/expomant.prg +++ b/harbour/contrib/hbct/tests/expomant.prg @@ -61,7 +61,7 @@ local n SET DECIMALS TO 15 - for n=1 to 1000 + for n := 1 to 1000 outstd (str(n,20,15)+": "+str(mantissa(n),20,15)+" "+str(exponent(n),4) + hb_osnewline()) outstd (str(sqrt(n),20,15)+": "+str(mantissa(sqrt(n)),20,15)+" "+str(exponent(sqrt(n)),4) + hb_osnewline()) next n diff --git a/harbour/contrib/hbfimage/tests/fitest.prg b/harbour/contrib/hbfimage/tests/fitest.prg index 4f99a20216..c94961adbe 100644 --- a/harbour/contrib/hbfimage/tests/fitest.prg +++ b/harbour/contrib/hbfimage/tests/fitest.prg @@ -8,7 +8,7 @@ * FreeImage API test file */ -#include "FreeImage.ch" +#include "freeimage.ch" #include "common.ch" #include "fileio.ch" diff --git a/harbour/contrib/hbhpdf/tests/harupdf.prg b/harbour/contrib/hbhpdf/tests/harupdf.prg index 7a703a3c26..883b2d0f21 100644 --- a/harbour/contrib/hbhpdf/tests/harupdf.prg +++ b/harbour/contrib/hbhpdf/tests/harupdf.prg @@ -59,23 +59,23 @@ //----------------------------------------------------------------------// //----------------------------------------------------------------------// -#include 'harupdf.ch' +#include "harupdf.ch" #ifdef __oHARBOUR__ -#include 'xhb.ch' +#include "xhb.ch" #endif //----------------------------------------------------------------------// Function Main( cFileToSave ) if empty( cFileToSave ) - cFileToSave := 'myharu.pdf' + cFileToSave := "myharu.pdf" endif if DesignHaruPDF( cFileToSave ) - Alert( 'PDF File <'+cFileToSave+'> is Created!' ) + Alert( "PDF File <"+cFileToSave+"> is Created!" ) else - Alert( 'Some problems in creating the PDF!' ) + Alert( "Some problems in creating the PDF!" ) endif @@ -85,7 +85,7 @@ Function Main( cFileToSave ) Function DesignHaruPDF( cFileToSave ) Local i, page, height, width, def_font, tw, samp_text, font - Local page_title := 'Vouch' + Local page_title := "Vouch" Local font_list := { ; "Courier", ; "Courier-Bold", ; @@ -106,7 +106,7 @@ Function DesignHaruPDF( cFileToSave ) Local pdf := HPDF_New() if pdf == NIL - alert( ' Pdf could not been created!' ) + alert( " Pdf could not been created!" ) return nil endif @@ -116,7 +116,7 @@ Function DesignHaruPDF( cFileToSave ) /* // Passwords and Permissions // - HPDF_SetPassword(pdf, 'owner','user' ) + HPDF_SetPassword(pdf, "owner","user" ) HPDF_SetPermission(pdf, HPDF_ENABLE_READ) // cannot print HPDF_SetEncryptionMode(pdf, HPDF_ENCRYPT_R3, 16) */ @@ -672,7 +672,7 @@ Static Function PrintText( page) static no := 0 no++ - buf := ltrim( str( no ) )+ ' '+ltrim(str(pos[1]))+' '+ltrim(str(pos[2])) + buf := ltrim( str( no ) )+ " "+ltrim(str(pos[1]))+" "+ltrim(str(pos[2])) HPDF_Page_ShowText(page, buf) Return nil diff --git a/harbour/contrib/hbmisc/twirler.prg b/harbour/contrib/hbmisc/twirler.prg index 8a7ac8b014..cf35e01427 100644 --- a/harbour/contrib/hbmisc/twirler.prg +++ b/harbour/contrib/hbmisc/twirler.prg @@ -8,7 +8,7 @@ Donated to the public domain on 2001-03-15 by David G. Holm */ -#include +#include "hbclass.ch" class Twirler var n_Row diff --git a/harbour/contrib/hbnf/dispmsg.prg b/harbour/contrib/hbnf/dispmsg.prg index c665985cb3..7101b7a65a 100644 --- a/harbour/contrib/hbnf/dispmsg.prg +++ b/harbour/contrib/hbnf/dispmsg.prg @@ -156,8 +156,8 @@ PROCEDURE Main( cCmdLine ) cErrE := IIF( lColor, "N/W" , "N/W" ) cDosScrn := SAVESCREEN() - nDosRow=ROW() - nDosCol=COL() + nDosRow := ROW() + nDosCol := COL() SETCOLOR( "W/N" ) CLS nMaxRow := MAXROW() diff --git a/harbour/contrib/hbnf/fttext.c b/harbour/contrib/hbnf/fttext.c index 224ffb1851..2afffb5c16 100644 --- a/harbour/contrib/hbnf/fttext.c +++ b/harbour/contrib/hbnf/fttext.c @@ -208,7 +208,7 @@ static int isEof[ TEXT_WORKAREAS]; static int error[ TEXT_WORKAREAS]; /* for debugging purposes */ -static int doInt=0; +static int doInt = 0; HB_FUNC_EXTERN( FT_GOBOT ); diff --git a/harbour/contrib/hbnf/menu1.prg b/harbour/contrib/hbnf/menu1.prg index 4fb69127af..d2642e67e1 100644 --- a/harbour/contrib/hbnf/menu1.prg +++ b/harbour/contrib/hbnf/menu1.prg @@ -258,8 +258,8 @@ STATIC NHPOS, NVPOS, NMAXROW, NMAXCOL cErrE := IF( lColor, "N/W" , "N/W" ) SAVE SCREEN TO sDosScrn - nDosRow=ROW() - nDosCol=COL() + nDosRow := ROW() + nDosCol := COL() SETCOLOR( "w/n" ) CLS NOSNOW( ( "NOSNOW" $ UPPER( cCmdLine ) ) ) diff --git a/harbour/contrib/hbnf/mouse1.prg b/harbour/contrib/hbnf/mouse1.prg index ea9a2b1683..d35c0131e4 100644 --- a/harbour/contrib/hbnf/mouse1.prg +++ b/harbour/contrib/hbnf/mouse1.prg @@ -20,16 +20,16 @@ static s_lMinit:=.F. local nHoriz, nVert, nDouble local nTime - IF nRow=NIL - nRow=MAXROW()+1 + IF nRow == NIL + nRow := MAXROW()+1 ELSE - nRow=VAL(nRow) + nRow := VAL(nRow) ENDIF - IF nCol=NIL - nCol=MAXCOL()+1 + IF nCol == NIL + nCol := MAXCOL()+1 ELSE - nCol=VAL(nCol) + nCol := VAL(nCol) ENDIF if !FT_MINIT() @@ -97,14 +97,14 @@ static s_lMinit:=.F. * to a "normal" CLIPPER program so some of these examples are a bit out of * the ordinary. - DO WHILE nX=0.AND.nY=0 + DO WHILE nX == 0 .AND. nY == 0 FT_MMICKEYS( @nX, @nY ) ENDDO * tell the mouse driver where updates will be taking place so it can hide * the cursor when necessary. FT_MCONOFF( 9, 23, 16, 53 ) - nTime=-1 + nTime := -1 devpos( 9, 23 ) devout( nX ) @@ -306,32 +306,32 @@ LOCAL nPrs // number of presses which occurred * Initialize any empty arguments - if nClick=NIL - nClick=1 + if nClick==NIL + nClick:=1 endif - if nButton=NIL - nButton=0 + if nButton==NIL + nButton:=0 endif - if nRow=NIL - nRow=FT_MGETX() + if nRow==NIL + nRow:=FT_MGETX() endif - if nCol=NIL - nCol=FT_MGETY() + if nCol==NIL + nCol:=FT_MGETY() endif - if nInterval=NIL - nInterval=0.5 + if nInterval==NIL + nInterval:=0.5 endif - if nStart=NIL - nStart=seconds() + if nStart==NIL + nStart:=seconds() endif - nVert=nRow - nHorz=nCol + nVert:=nRow + nHorz:=nCol lDouble:=lDone:=nClick==0 // Wait for first press if requested @@ -339,24 +339,24 @@ LOCAL nPrs // number of presses which occurred do while !lDone FT_MBUTPRS( nButton, @nPrs, @nVert, @nHorz ) - nVert=INT(nVert/8) - nHorz=INT(nHorz/8) + nVert:=INT(nVert/8) + nHorz:=INT(nHorz/8) - lDouble=(nPrs>0) - ldone= seconds() - nStart >= nInterval .or. lDouble + lDouble:=(nPrs>0) + ldone:= seconds() - nStart >= nInterval .or. lDouble enddo // if we have not moved then keep the preliminary double click setting - lDouble=lDouble.and.(nVert=nRow.and.nHorz=nCol) + lDouble:=lDouble.and.(nVert==nRow.and.nHorz==nCol) // change start time if we waited for first click. nInterval is the // maximum time between clicks not the total time for two clicks if // requested. if nClick>0 - nStart=seconds() + nStart:=seconds() endif // If we have fulfilled all of the requirements then wait for second click @@ -368,17 +368,17 @@ LOCAL nPrs // number of presses which occurred do while !lDone FT_MBUTPRS( nButton, @nPrs, @nVert, @nHorz ) - nVert=INT(nVert/8) - nHorz=INT(nHorz/8) + nVert:=INT(nVert/8) + nHorz:=INT(nHorz/8) - lDouble=(nPrs>0) - lDone= seconds() - nStart >= nInterval .or. lDouble + lDouble:=(nPrs>0) + lDone:= seconds() - nStart >= nInterval .or. lDouble enddo // make sure we haven't moved - lDouble=lDouble.and.(nVert=nRow.and.nHorz=nCol) + lDouble:=lDouble.and.(nVert==nRow.and.nHorz==nCol) endif @@ -532,16 +532,16 @@ FT_MGETSENS(@nCurHoriz, @nCurVert, @nCurDouble) // Set defaults if necessary -IF VALTYPE(nHoriz)!="N" - nHoriz=nCurHoriz +IF !( VALTYPE( nHoriz ) == "N" ) + nHoriz := nCurHoriz ENDIF -IF VALTYPE(nVert)!="N" - nVert=nCurVert +IF !( VALTYPE( nVert ) == "N" ) + nVert := nCurVert ENDIF -IF VALTYPE(nDouble)!="N" - nDouble=nCurDouble +IF !( VALTYPE( nDouble ) == "N" ) + nDouble := nCurDouble ENDIF * Fill the registers @@ -586,7 +586,7 @@ FUNCTION FT_MGETSENS(nHoriz, nVert, nDouble) /* * Fill the register -aReg[AX]=27 +aReg[AX]:=27 * Execute interupt @@ -595,9 +595,9 @@ FT_INT86( 51, aReg ) // execute mouse interrupt */ // Set the return values -nHoriz = _mget_horispeed() -nVert = _mget_verspeed() -nDouble= _mget_doublespeed() +nHoriz := _mget_horispeed() +nVert := _mget_verspeed() +nDouble:= _mget_doublespeed() RETURN NIL @@ -636,7 +636,7 @@ RETURN NIL * my screen showed 6.24 but this routine returned 30 for the minor version * number! * $EXAMPLES$ - * nMajor=FT_MVERSION( @nMinor ) + * nMajor:=FT_MVERSION( @nMinor ) * IF (nMajor+nMinor/100)<7.2 * ? "Sorry mouse driver version too old" * RETURN @@ -650,7 +650,7 @@ FUNCTION FT_MVERSION(nMinor, nType, nIRQ) Local aReturn:={} // Set up register /* -aReg[AX] = 36 +aReg[AX] := 36 // Call interupt @@ -659,9 +659,9 @@ FT_INT86( 51, aReg) // decode out of half registers areturn:=_mget_mversion() -nMinor=areturn[1] -nType=areturn[2] -nIRQ=areturn[3] +nMinor := areturn[1] +nType := areturn[2] +nIRQ := areturn[3] // Return @@ -697,8 +697,8 @@ FUNCTION FT_MSETPAGE(nPage) // Set up register /* -aReg[AX] = 29 -aReg[BX]=nPage +aReg[AX] := 29 +aReg[BX] := nPage // Call interupt @@ -737,7 +737,7 @@ FUNCTION FT_MGETPAGE() // Set up register /* -aReg[AX] = 30 +aReg[AX] := 30 // Call interupt @@ -803,7 +803,7 @@ LOCAL lStatus aReg[AX] := 0 // set mouse function call 0 FT_INT86( 51, aReg ) // execute mouse interrupt */ - s_lCrsState=.F. // Cursor is off after reset + s_lCrsState:=.F. // Cursor is off after reset lStatus:=_m_reset() * Reset maximum x and y limits @@ -842,7 +842,7 @@ RETURN lStatus // return status code FUNCTION FT_MCURSOR( lState ) local lSavState := s_lCrsState - if VALTYPE(lState)="L" + if VALTYPE(lState)=="L" if ( s_lCrsState := lState ) FT_MSHOWCRS() else @@ -1181,9 +1181,9 @@ RETURN NIL // no function output FUNCTION FT_MXLIMIT( nXMin, nXMax ) // set vertical minimum and maximum coordinates /* - aReg[AX] = 7 // set mouse function call 7 - aReg[CX] = nXMin // load vertical minimum parameter - aReg[DX] = nXMax // load vertical maximum parameter + aReg[AX] := 7 // set mouse function call 7 + aReg[CX] := nXMin // load vertical minimum parameter + aReg[DX] := nXMax // load vertical maximum parameter FT_INT86( 51, aReg ) // execute mouse interrupt */ _m_mxlimit(nXMin,nXMAX) @@ -1216,9 +1216,9 @@ RETURN NIL FUNCTION FT_MYLIMIT( nYMin, nYMax ) // set horizontal minimum and maximum coordinates /* - aReg[AX] = 8 // set mouse function call 8 - aReg[CX] = nYMin // load horz minimum parameter - aReg[DX] = nYMax // load horz maximum parameter + aReg[AX] := 8 // set mouse function call 8 + aReg[CX] := nYMin // load horz minimum parameter + aReg[DX] := nYMax // load horz maximum parameter FT_INT86( 51, aReg ) // execute mouse interrupt */ _m_mYlimit(nYMin,nYMAX) @@ -1401,10 +1401,10 @@ RETURN iButton FUNCTION FT_MDEFCRS( nCurType, nScrMask, nCurMask ) // define text cursor type and masks /* - aReg[AX] = 10 // set mouse function call 10 - aReg[BX] = nCurType // load cursor type parameter - aReg[CX] = nScrMask // load screen mask value - aReg[DX] = nCurMask // load cursor mask value + aReg[AX] := 10 // set mouse function call 10 + aReg[BX] := nCurType // load cursor type parameter + aReg[CX] := nScrMask // load screen mask value + aReg[DX] := nCurMask // load cursor mask value FT_INT86( 51, aReg ) // execute mouse interrupt */ _m_mdefcrs(nCurType, nScrMask, nCurMask ) diff --git a/harbour/contrib/hbnf/mouse2.prg b/harbour/contrib/hbnf/mouse2.prg index e62f14a3c1..fb4dda994b 100644 --- a/harbour/contrib/hbnf/mouse2.prg +++ b/harbour/contrib/hbnf/mouse2.prg @@ -87,16 +87,16 @@ static lMinit:=.F. local nHoriz, nVert, nDouble local nTime - IF nRow=NIL - nRow=MAXROW()+1 + IF nRow==NIL + nRow:=MAXROW()+1 ELSE - nRow=VAL(nRow) + nRow:=VAL(nRow) ENDIF - IF nCol=NIL - nCol=MAXCOL()+1 + IF nCol==NIL + nCol:=MAXCOL()+1 ELSE - nCol=VAL(nCol) + nCol:=VAL(nCol) ENDIF IF .NOT.SETMODE(nRow,nCol) @@ -170,14 +170,14 @@ static lMinit:=.F. * to a "normal" CLIPPER program so some of these examples are a bit out of * the ordinary. - DO WHILE nX=0.AND.nY=0 + DO WHILE nX==0.AND.nY==0 FT_MMICKEYS( @nX, @nY ) ENDDO * tell the mouse driver where updates will be taking place so it can hide * the cursor when necessary. FT_MCONOFF( 9, 23, 16, 53 ) - nTime=-1 + nTime:=-1 devpos( 9, 23 ) devout( nX ) diff --git a/harbour/contrib/hbnf/pchr.prg b/harbour/contrib/hbnf/pchr.prg index 74cbd08718..5536354eb4 100644 --- a/harbour/contrib/hbnf/pchr.prg +++ b/harbour/contrib/hbnf/pchr.prg @@ -119,7 +119,7 @@ Function FT_PCHR(c_nums) Local c_ret:='', c_st:=0,c_part,c_st2,c_hex:="0123456789ABCDEF" Local c_upper,c_t1,c_t2 - If Substr(c_nums,1,1)=','.or.Trim(c_nums)=='' + If Substr(c_nums,1,1)==','.or.Trim(c_nums)=='' Return "" Endif @@ -128,32 +128,32 @@ Function FT_PCHR(c_nums) Do While .not.(c_part=="~".or.c_part=="") - If Substr(c_part,1,1)=Chr(34) + If Substr(c_part,1,1)==Chr(34) c_st2:=At(Chr(34),Substr(c_part,2))+1 c_ret:=c_ret+Substr(c_part,2,c_st2-2) - Elseif Substr(c_part,1,1)="&" + Elseif Substr(c_part,1,1)=="&" - c_upper=Upper(c_part) - c_t1=At(Substr(c_upper,2,1),c_hex)-1 + c_upper:=Upper(c_part) + c_t1:=At(Substr(c_upper,2,1),c_hex)-1 If c_t1>-1 - c_t2=At(Substr(c_upper,3,1),c_hex)-1 + c_t2:=At(Substr(c_upper,3,1),c_hex)-1 If c_t2>-1 - c_t1=c_t1*16+c_t2 + c_t1:=c_t1*16+c_t2 Endif - c_ret=c_ret+Chr(c_t1) + c_ret:=c_ret+Chr(c_t1) Endif - ElseIf (Val(c_part)>0.and.Val(c_part)<256).or.c_part="0" + ElseIf (Val(c_part)>0.and.Val(c_part)<256).or.c_part=="0" - c_ret=c_ret+Chr(Val(c_part)) + c_ret:=c_ret+Chr(Val(c_part)) Else - If Substr(c_part,1,1)="/" + If Substr(c_part,1,1)=="/" - c_upper=Upper(c_part) + c_upper:=Upper(c_part) Do Case Case c_upper = '/GRAPHIC' diff --git a/harbour/contrib/hbnf/popadder.prg b/harbour/contrib/hbnf/popadder.prg index 3e98304b52..fd245de8ec 100644 --- a/harbour/contrib/hbnf/popadder.prg +++ b/harbour/contrib/hbnf/popadder.prg @@ -54,14 +54,14 @@ * * There are a few HOT Keys while using the Adder: * - * ecimals Ä change # of decimals - * ove Ä the Adder from right display to left - * ape Ä turn the Tape Display On or Off - * croll Ä the tape display - * ÄÄÄÂÄÄ 1st Clear entry - * ÀÄÄ 2nd Clear ADDER - * Ä Quit - * Ä return a to the active get + * ecimals - change # of decimals + * ove - the Adder from right display to left + * ape - turn the Tape Display On or Off + * croll - the tape display + * ---+-- 1st Clear entry + * +-- 2nd Clear ADDER + * - Quit + * - return a to the active get * * * A couple of notes about the adder: @@ -111,10 +111,10 @@ * $END$ */ -#include 'inkey.ch' -#include 'setcurs.ch' -#include 'achoice.ch' -#include 'common.ch' +#include "inkey.ch" +#include "setcurs.ch" +#include "achoice.ch" +#include "common.ch" // Set up manifest constants to access the window colors in the array aWinColor #define W_BORDER 1 @@ -142,15 +142,15 @@ #define K_MULTIPLY 42 #define K_DIVIDE 47 #define K_ZERO 48 -#define B_DOUBLE 'ÉÍ»º¼ÍȺ ' -#define B_SINGLE 'ÚÄ¿³ÙÄÀ³ ' +#define B_DOUBLE "ÉÍ»º¼ÍȺ " +#define B_SINGLE "+-+|+-+| " #define CRLF CHR(13)+CHR(10) #define nTotTran LEN(aTrans) #command DEFAULT

TO [, TO ] => ; -

:= IF(

== NIL, ,

) ; - [; := IF( == NIL, , )] +

:= IIF(

== NIL, ,

) ; + [; := IIF( == NIL, , )] #command DISPMESSAGE ,,,, => ; _ftPushKeys(); KEYBOARD CHR(K_CTRL_PGDN)+CHR(K_CTRL_W) ;; @@ -222,16 +222,16 @@ STATIC lAdderOpen := .F., ; * SIMPLE Sample of program data entry! - @ 12,5 SAY 'Please enter the total Sick, Personal, and Vacation hours.' - @ 15,22 SAY 'Sick hrs.' - @ 15,40 SAY 'Pers. hrs.' - @ 15,60 SAY 'Vaca. hrs.' - @ 23,20 SAY 'Press to Pop - Up the Adder.' - @ 24,20 SAY 'Press to Quit the adder Demo.' + @ 12,5 SAY "Please enter the total Sick, Personal, and Vacation hours." + @ 15,22 SAY "Sick hrs." + @ 15,40 SAY "Pers. hrs." + @ 15,60 SAY "Vaca. hrs." + @ 23,20 SAY "Press to Pop - Up the Adder." + @ 24,20 SAY "Press to Quit the adder Demo." DO WHILE .T. // Get the sick, personal, & vaca - @ 16,24 GET nSickHrs PICTURE '9999.999' // Normally I have a VALID() - @ 16,43 GET nPersHrs PICTURE '9999.999' // to make sure the value is - @ 16,63 GET nVacaHrs PICTURE '9999.999' // within the allowable range. + @ 16,24 GET nSickHrs PICTURE "9999.999" // Normally I have a VALID() + @ 16,43 GET nPersHrs PICTURE "9999.999" // to make sure the value is + @ 16,63 GET nVacaHrs PICTURE "9999.999" // within the allowable range. SET CURSOR ON // But, like I said it is a CLEAR TYPEAHEAD // SIMPLE example . READ @@ -250,21 +250,21 @@ STATIC lAdderOpen := .F., ; -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: FT_Adder() Docs: Keith A. Wire ³ - ³ Description: Pop Up Adder / Calculator with Tape Display ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 11:18:40am Time updated: þ11:18:40am ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ³ Notes: To make FT_Adder() pop up from any wait state in your ³ - ³ : application just insert the line: ³ - ³ : SET KEY K_ALT_A TO FT_Adder ³ - ³ : at the top of your application ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: FT_Adder() Docs: Keith A. Wire | + | Description: Pop Up Adder / Calculator with Tape Display | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 11:18:40am Time updated: 11:18:40am | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + | Notes: To make FT_Adder() pop up from any wait state in your | + | : application just insert the line: | + | : SET KEY K_ALT_A TO FT_Adder | + | : at the top of your application | + +--------------------------------------------------------------------------+ */ FUNCTION FT_Adder() @@ -285,10 +285,10 @@ FUNCTION FT_Adder() lAdderOpen := .T. ENDIF - aTrans := {' 0.00 C '} + aTrans := {" 0.00 C "} nOldDecim := SET(_SET_DECIMALS,9) - cTotPict := '999999999999999.99' - cTapeScr := '' + cTotPict := "999999999999999.99" + cTapeScr := "" nTotal := nNumTotal := nSavTotal := nDecDigit := 0 lDone := .F. // Loop flag nKey := 0 @@ -303,8 +303,8 @@ FUNCTION FT_Adder() nTopOS := INT((MAXROW()-24)/2) // Using the TopOffSet & LeftOffSet nLeftOS := INT((MAXCOL()-79)/2) // the Adder will always be centered - nAddSpace := IF(lShowRight,40,0)+nLeftOS - nTapeSpace := IF(lShowRight,0,40)+nLeftOS + nAddSpace := IIF(lShowRight,40,0)+nLeftOS + nTapeSpace := IIF(lShowRight,0,40)+nLeftOS // Set Up the STATIC variables aKeys := {} @@ -320,7 +320,7 @@ FUNCTION FT_Adder() DO WHILE ! lDone // Input key & test loop FT_INKEY 0 TO nKey DO CASE - CASE UPPER(CHR(nKey)) $'1234567890.' + CASE UPPER(CHR(nKey)) $"1234567890." _ftProcessNumb(aAdder, nKey) CASE nKey == K_PLUS // <+> sign _ftAddSub(aAdder, nKey) @@ -353,22 +353,22 @@ FUNCTION FT_Adder() RESTSCREEN(4+nTopOS,6+nTapeSpace,22+nTopOS,35+nTapeSpace,cTapeScr) ENDIF IF LEFT(SAVESCREEN(6+nTopOS,26+nAddSpace,6+nTopOS,27+nAddSpace),1) ; - != ' ' + != " " IF LEFT(SAVESCREEN(6+nTopOS,19+nAddSpace,6+nTopOS,20+nAddSpace),1) ; - == 'S' - cMoveTotSubTot := 'S' + == "S" + cMoveTotSubTot := "S" ELSE - cMoveTotSubTot := 'T' + cMoveTotSubTot := "T" ENDIF ELSE - cMoveTotSubTot := ' ' + cMoveTotSubTot := " " ENDIF cTotal := _ftCharOdd(SAVESCREEN( 4 + nTopOS, 8 + nAddSpace, 4 + ; nTopOS,25+nAddSpace)) _ftPopWin() // Remove Adder lShowRight := !lShowRight - nAddSpace := IF(lShowRight,40,0)+nLeftOS - nTapeSpace := IF(lShowRight,0,40)+nLeftOS + nAddSpace := IIF(lShowRight,40,0)+nLeftOS + nTapeSpace := IIF(lShowRight,0,40)+nLeftOS _ftAddScreen(aAdder) _ftDispTotal(aAdder) IF lTape @@ -378,26 +378,26 @@ FUNCTION FT_Adder() @ 4+nTopOS, 8+nAddSpace SAY cTotal IF !EMPTY(cMoveTotSubTot) _ftSetWinColor(W_CURR,W_SCREEN) - @ 6+nTopOS,18+nAddSpace SAY IF(cMoveTotSubTot=='T', ' ', ; - '') + @ 6+nTopOS,18+nAddSpace SAY IIF(cMoveTotSubTot=="T", " ", ; + "") _ftSetWinColor(W_CURR,W_PROMPT) ENDIF CASE (nKey == 83 .OR. nKey == 115) .AND. lTape // Scroll tape display IF nTotTran>16 // We need to scroll - SETCOLOR('GR+/W') - @ 21+nTopOS,8+nTapeSpace SAY ' '+CHR(24)+CHR(25)+'-SCROLL -QUIT ' - SETCOLOR('N/W,W+/N') + SETCOLOR("GR+/W") + @ 21+nTopOS,8+nTapeSpace SAY " "+CHR(24)+CHR(25)+"-SCROLL -QUIT " + SETCOLOR("N/W,W+/N") ACHOICE(5+nTopOS,7+nTapeSpace,20+nTopOS,32+nTapeSpace,aTrans,.T., ; - '_ftAdderTapeUDF',nTotTran,20) - SETCOLOR('R+/W') + "_ftAdderTapeUDF",nTotTran,20) + SETCOLOR("R+/W") @ 21+nTopOS,8+nTapeSpace TO 21+nTopOS,30+nTapeSpace _ftSetWinColor(W_CURR,W_PROMPT) CLEAR TYPEAHEAD ELSE - _ftError('there are ' + IF(nTotTran > 0, 'only ' + ; - LTRIM(STR(nTotTran, 3, 0)), 'no') + ; - ' transactions entered so far.' + ; - ' No need to scroll!') + _ftError("there are " + IIF(nTotTran > 0, "only " + ; + LTRIM(STR(nTotTran, 3, 0)), "no") + ; + " transactions entered so far." + ; + " No need to scroll!") ENDIF CASE nKey == 7 // Delete - Clear adder _ftClearAdder(aAdder) @@ -405,7 +405,7 @@ FUNCTION FT_Adder() _ftAddHelp() CASE nKey == K_F10 // Quit - Return total IF lTotalOk // Did they finish the calculation - IF oGet != NIL .AND. oGet:TYPE == 'N' + IF oGet != NIL .AND. oGet:TYPE == "N" SET(_SET_DECIMALS,nOldDecim) SETCURSOR(nOldCurs) IF lTape @@ -419,13 +419,13 @@ FUNCTION FT_Adder() lAdderOpen := .F. // Reset the recursive flag lDone := .T. ELSE - _ftError('but I can not return the total from the '+ ; - 'adder to this variable. You must quit the adder using'+ ; - ' the key and then enter the total manually.') + _ftError("but I can not return the total from the "+ ; + "adder to this variable. You must quit the adder using"+ ; + " the key and then enter the total manually.") ENDIF ELSE - _ftError('the calculation is not finished yet! You must have'+ ; - ' a TOTAL before you can return it to the program.') + _ftError("the calculation is not finished yet! You must have"+ ; + " a TOTAL before you can return it to the program.") ENDIF ENDCASE ENDDO (WHILE .T. Data entry from keyboard) @@ -437,93 +437,93 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftAddScreen() Docs: Keith A. Wire ³ - ³ Description: Display the Adder ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 11:24:29am Time updated: þ11:24:29am ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftAddScreen() Docs: Keith A. Wire | + | Description: Display the Adder | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 11:24:29am Time updated: 11:24:29am | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftAddScreen(aAdder) LOCAL nCol - _ftPushWin(2+nTopOS,2+nAddSpace,22+nTopOS,30+nAddSpace,' Adder ', ; - ' for Help',,B_DOUBLE) + _ftPushWin(2+nTopOS,2+nAddSpace,22+nTopOS,30+nAddSpace," Adder ", ; + " for Help",,B_DOUBLE) nCol := 5+nAddSpace - @ 7+nTopOS, nCol SAY ' ÚÄÄÄ¿ ÚÄÄÄ¿ ÚÄÄÄ¿' - @ 8+nTopOS, nCol SAY ' ³ ³ ³ ³ ³ ³' - @ 9+nTopOS, nCol SAY ' ÀÄÄÄÙ ÀÄÄÄÙ ÀÄÄÄÙ' - @ 10+nTopOS, nCol SAY 'ÚÄÄÄ¿ ÚÄÄÄ¿ ÚÄÄÄ¿ ÚÄÄÄ¿' - @ 11+nTopOS, nCol SAY '³ ³ ³ ³ ³ ³ ³ ³' - @ 12+nTopOS, nCol SAY 'ÀÄÄÄÙ ÀÄÄÄÙ ÀÄÄÄÙ ³ ³' - @ 13+nTopOS, nCol SAY 'ÚÄÄÄ¿ ÚÄÄÄ¿ ÚÄÄÄ¿ ³ ³' - @ 14+nTopOS, nCol SAY '³ ³ ³ ³ ³ ³ ³ ³' - @ 15+nTopOS, nCol SAY 'ÀÄÄÄÙ ÀÄÄÄÙ ÀÄÄÄÙ ÀÄÄÄÙ' - @ 16+nTopOS, nCol SAY 'ÚÄÄÄ¿ ÚÄÄÄ¿ ÚÄÄÄ¿ ÚÄÄÄ¿' - @ 17+nTopOS, nCol SAY '³ ³ ³ ³ ³ ³ ³ ³' - @ 18+nTopOS, nCol SAY 'ÀÄÄÄÙ ÀÄÄÄÙ ÀÄÄÄÙ ³ ³' - @ 19+nTopOS, nCol SAY 'ÚÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄ¿ ³ ³' - @ 20+nTopOS, nCol SAY '³ ³ ³ ³ ³ ³' - @ 21+nTopOS, nCol SAY 'ÀÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÙ ÀÄÄÄÙ' + @ 7+nTopOS, nCol SAY " +---+ +---+ +---+" + @ 8+nTopOS, nCol SAY " | | | | | |" + @ 9+nTopOS, nCol SAY " +---+ +---+ +---+" + @ 10+nTopOS, nCol SAY "+---+ +---+ +---+ +---+" + @ 11+nTopOS, nCol SAY "| | | | | | | |" + @ 12+nTopOS, nCol SAY "+---+ +---+ +---+ | |" + @ 13+nTopOS, nCol SAY "+---+ +---+ +---+ | |" + @ 14+nTopOS, nCol SAY "| | | | | | | |" + @ 15+nTopOS, nCol SAY "+---+ +---+ +---+ +---+" + @ 16+nTopOS, nCol SAY "+---+ +---+ +---+ +---+" + @ 17+nTopOS, nCol SAY "| | | | | | | |" + @ 18+nTopOS, nCol SAY "+---+ +---+ +---+ | |" + @ 19+nTopOS, nCol SAY "+---------+ +---+ | |" + @ 20+nTopOS, nCol SAY "| | | | | |" + @ 21+nTopOS, nCol SAY "+---------+ +---+ +---+" _ftSetWinColor(W_CURR,W_TITLE) nCol := 7+nAddSpace - @ 11+nTopOS, nCol SAY '7' - @ 14+nTopOS, nCol SAY '4' - @ 17+nTopOS, nCol SAY '1' + @ 11+nTopOS, nCol SAY "7" + @ 14+nTopOS, nCol SAY "4" + @ 17+nTopOS, nCol SAY "1" nCol := 13+nAddSpace - @ 8+nTopOS,nCol SAY '/' - @ 11+nTopOS,nCol SAY '8' - @ 14+nTopOS,nCol SAY '5' - @ 17+nTopOS,nCol SAY '2' + @ 8+nTopOS,nCol SAY "/" + @ 11+nTopOS,nCol SAY "8" + @ 14+nTopOS,nCol SAY "5" + @ 17+nTopOS,nCol SAY "2" nCol := 19+nAddSpace - @ 8+nTopOS,nCol SAY 'X' - @ 11+nTopOS,nCol SAY '9' - @ 14+nTopOS,nCol SAY '6' - @ 17+nTopOS,nCol SAY '3' - @ 20+nTopOS,nCol SAY '.' - @ 20+nTopOS,10+nAddSpace SAY '0' + @ 8+nTopOS,nCol SAY "X" + @ 11+nTopOS,nCol SAY "9" + @ 14+nTopOS,nCol SAY "6" + @ 17+nTopOS,nCol SAY "3" + @ 20+nTopOS,nCol SAY "." + @ 20+nTopOS,10+nAddSpace SAY "0" nCol := 25+nAddSpace - @ 8+nTopOS,nCol SAY '-' - @ 13+nTopOS,nCol SAY '+' - @ 18+nTopOS,nCol SAY '=' - @ 19+nTopOS,nCol SAY '' + @ 8+nTopOS,nCol SAY "-" + @ 13+nTopOS,nCol SAY "+" + @ 18+nTopOS,nCol SAY "=" + @ 19+nTopOS,nCol SAY "" _ftSetWinColor(W_CURR,W_PROMPT) @ 3+nTopOS, 6+nAddSpace, 5+nTopOS, 27+nAddSpace BOX B_DOUBLE RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftChangeDec() Docs: Keith A. Wire ³ - ³ Description: Change the decimal position in the display ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 11:25:17am Time updated: þ11:25:17am ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : nNumDec ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftChangeDec() Docs: Keith A. Wire | + | Description: Change the decimal position in the display | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 11:25:17am Time updated: 11:25:17am | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : nNumDec | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftChangeDec(aAdder, nNumDec) - LOCAL cDefTotPict := '9999999999999999999' + LOCAL cDefTotPict := "9999999999999999999" IF nNumDec == NIL nNumDec := 0 - nNumDec := _ftQuest('How many decimals do you want to display?', ; - nNumDec, '9', {|oGet| _ftValDeci(oGet)}) + nNumDec := _ftQuest("How many decimals do you want to display?", ; + nNumDec, "9", {|oGet| _ftValDeci(oGet)}) - cTotPict := _ftPosRepl(cDefTotPict, '.', 19 - ABS(nNumDec)) + cTotPict := _ftPosRepl(cDefTotPict, ".", 19 - ABS(nNumDec)) cTotPict := RIGHT(_ftStuffComma(cTotPict), 19 ) - cTotPict := IIF(nNumDec==2 .OR. nNumDec==6, ' '+RIGHT(cTotPict,18),cTotPict) + cTotPict := IIF(nNumDec==2 .OR. nNumDec==6, " "+RIGHT(cTotPict,18),cTotPict) nMaxDeci := nNumDec @@ -539,27 +539,27 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftDispTotal() Docs: Keith A. Wire ³ - ³ Description: Display total number to Adder Window ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 11:25:58am Time updated: þ11:25:58am ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftDispTotal() Docs: Keith A. Wire | + | Description: Display total number to Adder Window | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 11:25:58am Time updated: 11:25:58am | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftDispTotal(aAdder) LOCAL cTotStr - IF nTotal>VAL(_ftCharRem(',',cTotPict)) + IF nTotal>VAL(_ftCharRem(",",cTotPict)) cTotStr := _ftStuffComma(LTRIM(STR(nTotal))) - @ 4+nTopOS, 8+nAddSpace SAY '**** ERROR **** ' - _ftError('that number is to big to display! I believe the answer was ' + ; - cTotStr+'.') + @ 4+nTopOS, 8+nAddSpace SAY "**** ERROR **** " + _ftError("that number is to big to display! I believe the answer was " + ; + cTotStr+".") lAddError := .T. _ftUpdateTrans(aAdder, .T., NIL) _ftClearAdder(aAdder) @@ -575,27 +575,27 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftDispSubTot() Docs: Keith A. Wire ³ - ³ Description: Display subtotal number ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 11:26:31am Time updated: þ11:26:31am ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftDispSubTot() Docs: Keith A. Wire | + | Description: Display subtotal number | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 11:26:31am Time updated: 11:26:31am | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftDispSubTot(aAdder) LOCAL cStotStr - IF nNumTotal>VAL(_ftCharRem(',',cTotPict)) + IF nNumTotal>VAL(_ftCharRem(",",cTotPict)) cStotStr := _ftStuffComma(LTRIM(STR(nNumTotal))) - @ 4+nTopOS, 8+nAddSpace SAY '**** ERROR **** ' - _ftError('that number is to big to display! I believe the answer was ' + ; - cStotStr+'.') + @ 4+nTopOS, 8+nAddSpace SAY "**** ERROR **** " + _ftError("that number is to big to display! I believe the answer was " + ; + cStotStr+".") lAddError := .T. _ftUpdateTrans(aAdder, .T.,nNumTotal) _ftClearAdder(aAdder) @@ -609,18 +609,18 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftProcessNumb() Docs: Keith A. Wire ³ - ³ Description: Act on NUMBER key pressed ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 11:38:34am Time updated: þ11:38:34am ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : nKey ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftProcessNumb() Docs: Keith A. Wire | + | Description: Act on NUMBER key pressed | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 11:38:34am Time updated: 11:38:34am | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : nKey | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftProcessNumb(aAdder, nKey) LOCAL nNum @@ -629,7 +629,7 @@ STATIC FUNCTION _ftProcessNumb(aAdder, nKey) lClAdder := .F. // Reset the Clear flag lAddError := .F. // Reset adder error flag - IF nKey=46 // Period (.) decimal point + IF nKey == Asc( "." ) // Period (.) decimal point IF lDecSet // Has decimal already been set TONE(800, 1) ELSE @@ -656,17 +656,17 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftAddTotal() Docs: Keith A. Wire ³ - ³ Description: Enter key - SUBTOTAL\TOTAL ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:05:29pm Time updated: þ12:05:29pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftAddTotal() Docs: Keith A. Wire | + | Description: Enter key - SUBTOTAL\TOTAL | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:05:29pm Time updated: 12:05:29pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftAddTotal(aAdder) _ftEraseTotSubTot(aAdder) @@ -676,7 +676,7 @@ STATIC FUNCTION _ftAddTotal(aAdder) IF lSubRtn // If this was the second time they IF !lMultDiv _ftSetWinColor(W_CURR,W_SCREEN) - @ 6+nTopOS, 18+nAddSpace SAY ' ' + @ 6+nTopOS, 18+nAddSpace SAY " " _ftSetWinColor(W_CURR,W_PROMPT) _ftUpdateTrans(aAdder, .T., NIL) _ftDispTotal(aAdder) @@ -692,7 +692,7 @@ STATIC FUNCTION _ftAddTotal(aAdder) IF _ftRoundIt(nTotal,nMaxDeci)!=0 .OR. _ftRoundIt(nNumTotal,nMaxDeci)!=0 IF !lMultDiv _ftSetWinColor(W_CURR,W_SCREEN) - @ 6+nTopOS, 18+nAddSpace SAY '' + @ 6+nTopOS, 18+nAddSpace SAY "" _ftSetWinColor(W_CURR,W_PROMPT) ENDIF IF _ftRoundIt(nNumTotal,nMaxDeci)!=0 @@ -719,7 +719,7 @@ STATIC FUNCTION _ftAddTotal(aAdder) _ftDispTotal(aAdder) IF lMultDiv // This was a multiply or divide _ftSetWinColor(W_CURR,W_SCREEN) - @ 6+nTopOS, 18+nAddSpace SAY ' ' + @ 6+nTopOS, 18+nAddSpace SAY " " _ftSetWinColor(W_CURR,W_PROMPT) lSubRtn := .F. // pressed total so key reset everything IF !lTotalOk // If you haven't printed total DO-IT @@ -742,18 +742,18 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftAddSub() Docs: Keith A. Wire ³ - ³ Description: Process + or - keypress ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:06:13pm Time updated: þ12:06:13pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : nKey ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftAddSub() Docs: Keith A. Wire | + | Description: Process + or - keypress | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:06:13pm Time updated: 12:06:13pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : nKey | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftAddSub(aAdder, nKey) @@ -799,18 +799,18 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftMultDiv() Docs: Keith A. Wire ³ - ³ Description: Process * or / keypress ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:06:43pm Time updated: þ12:06:43pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : nKey ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftMultDiv() Docs: Keith A. Wire | + | Description: Process * or / keypress | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:06:43pm Time updated: 12:06:43pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : nKey | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftMultDiv(aAdder, nKey) @@ -860,40 +860,40 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftAddHelp Docs: Keith A. Wire ³ - ³ Description: Help window ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:07:07pm Time updated: þ12:07:07pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftAddHelp Docs: Keith A. Wire | + | Description: Help window | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:07:07pm Time updated: 12:07:07pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftAddHelp - LOCAL cMess := 'This Adder works like a desk top calculator. You may add,'+; - ' subtract, multiply, or divide. ' + CRLF + CRLF +; - 'When adding or subtracting, the first entry is entered ' +; - 'into the accumulator and each sucessive entry is ' +; - 'subtotaled. When you press the SubTotal is also ' +; - 'shown on the tape. The second time you press the '+; - 'adder is Totaled. When multiplying or dividing the ' +; - ' is a Total the first time pressed.' + CRLF + CRLF +; - 'Hot Keys:' +CRLF+; - ' ecimals Ä change # of decimals' +CRLF+; - ' ove Ä the Adder from right to left' +CRLF+; - ' ape Ä turn Tape Display On or Off' +CRLF+; - ' croll Ä the tape display' + CRLF +CRLF+; - ' ÄÄÄÂÄÄ 1st Clear entry' +CRLF+; - ' ÀÄÄ 2nd Clear ADDER' +CRLF+; - ' Ä Quit' +CRLF+; - ' Ä return a to the active get' + LOCAL cMess := "This Adder works like a desk top calculator. You may add,"+; + " subtract, multiply, or divide. " + CRLF + CRLF +; + "When adding or subtracting, the first entry is entered " +; + "into the accumulator and each sucessive entry is " +; + "subtotaled. When you press the SubTotal is also " +; + "shown on the tape. The second time you press the "+; + "adder is Totaled. When multiplying or dividing the " +; + " is a Total the first time pressed." + CRLF + CRLF +; + "Hot Keys:" +CRLF+; + " ecimals - change # of decimals" +CRLF+; + " ove - the Adder from right to left" +CRLF+; + " ape - turn Tape Display On or Off" +CRLF+; + " croll - the tape display" + CRLF +CRLF+; + " ---Â-- 1st Clear entry" +CRLF+; + " +-- 2nd Clear ADDER" +CRLF+; + " - Quit" +CRLF+; + " - return a to the active get" - _ftPushMessage(cMess, .T., 'ADDER HELP', 'press any key to continue...', ; - 'QUIET') + _ftPushMessage(cMess, .T., "ADDER HELP", "press any key to continue...", ; + "QUIET") RETURN NIL @@ -901,17 +901,17 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftClearAdder() Docs: Keith A. Wire ³ - ³ Description: Clear entry / Clear Adder ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:07:33pm Time updated: þ12:07:33pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftClearAdder() Docs: Keith A. Wire | + | Description: Clear entry / Clear Adder | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:07:33pm Time updated: 12:07:33pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftClearAdder(aAdder) @@ -934,27 +934,27 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftUpdateTrans() Docs: Keith A. Wire ³ - ³ Description: Update transactions array ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:07:55pm Time updated: þ12:07:55pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : lTypeTotal ³ - ³ : nAmount ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftUpdateTrans() Docs: Keith A. Wire | + | Description: Update transactions array | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:07:55pm Time updated: 12:07:55pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : lTypeTotal | + | : nAmount | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftUpdateTrans(aAdder, lTypeTotal, nAmount) LOCAL lUseTotal := (nAmount == NIL) - nAmount := IF(nAmount==NIL,0,nAmount) + nAmount := IIF(nAmount==NIL,0,nAmount) IF lClAdder // Clear the adder (they pressed twice - AADD(aTrans,STR(0,22,nMaxDeci)+' C') + AADD(aTrans,STR(0,22,nMaxDeci)+" C") IF lTape // If there is a tape Show Clear _ftDisplayTape(aAdder) ENDIF @@ -962,16 +962,16 @@ STATIC FUNCTION _ftUpdateTrans(aAdder, lTypeTotal, nAmount) ENDIF IF lTypeTotal // If lTypeTotal=.T. Update from total - AADD(aTrans,STR(IF(lUseTotal,nTotal,nAmount),22,nMaxDeci) ) - aTrans[nTotTran] := _ftStuffComma(aTrans[nTotTran], .T.) + ' *'+ ; - IF(lAddError,'ER','') + AADD(aTrans,STR(IIF(lUseTotal,nTotal,nAmount),22,nMaxDeci) ) + aTrans[nTotTran] := _ftStuffComma(aTrans[nTotTran], .T.) + " *"+ ; + IIF(lAddError,"ER","") ELSE // If lTypeTotal=.F. Update from nNumTotal - AADD(aTrans,STR(IF(lUseTotal,nTotal,nAmount),22,nMaxDeci)) + AADD(aTrans,STR(IIF(lUseTotal,nTotal,nAmount),22,nMaxDeci)) aTrans[nTotTran] := _ftStuffComma(aTrans[nTotTran], .T.) + ; - IF(lSubRtn,' S',IF(nAddMode==1,' +',IF(nAddMode==2,' -',IF ; - (lTotalOk,' =',IF(nAddMode==3,' X',' /'))))) + IF(lAddError,'ER','') + IIF(lSubRtn," S",IIF(nAddMode==1," +",IIF(nAddMode==2," -",IF ; + (lTotalOk," =",IIF(nAddMode==3," X"," /"))))) + IIF(lAddError,"ER","") ENDIF @@ -984,61 +984,61 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftEraseTotSubTot() Docs: Keith A. Wire ³ - ³ Description: Clear the & from Adder ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:08:14pm Time updated: þ12:08:14pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftEraseTotSubTot() Docs: Keith A. Wire | + | Description: Clear the & from Adder | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:08:14pm Time updated: 12:08:14pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftEraseTotSubTot(aAdder) _ftSetWinColor(W_CURR,W_SCREEN) - @ 6+nTopOS, 18+nAddSpace SAY ' ' + @ 6+nTopOS, 18+nAddSpace SAY " " _ftSetWinColor(W_CURR,W_PROMPT) RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftRoundIt() Docs: Keith A. Wire ³ - ³ Description: Adder Rounding function ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:09:00pm Time updated: þ12:09:00pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: nNumber ³ - ³ : nPlaces ³ - ³ Return Value: INT@( ABS@(nNumber@) @* 10 @^ nPlaces @+ 0@.50 @+ 10 @^ - ;³ - ³ : 12 @) / 10 @^ nPlaces ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftRoundIt() Docs: Keith A. Wire | + | Description: Adder Rounding function | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:09:00pm Time updated: 12:09:00pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: nNumber | + | : nPlaces | + | Return Value: INT@( ABS@(nNumber@) @* 10 @^ nPlaces @+ 0@.50 @+ 10 @^ - ;| + | : 12 @) / 10 @^ nPlaces | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftRoundIt(nNumber, nPlaces) - nPlaces := IF( nPlaces == NIL, 0, nPlaces ) -RETURN IF(nNumber < 0.0, -1.0, 1.0) * ; + nPlaces := IIF( nPlaces == NIL, 0, nPlaces ) +RETURN IIF(nNumber < 0.0, -1.0, 1.0) * ; INT( ABS(nNumber) * 10 ^ nPlaces + 0.50 + 10 ^ -12 ) / 10 ^ nPlaces -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftDivide() Docs: Keith A. Wire ³ - ³ Description: Check divide by zero not allowed ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:10:41pm Time updated: þ12:10:41pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : nNumerator ³ - ³ : nDenominator ³ - ³ Return Value: @(nNumerator/nDenominator@) ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftDivide() Docs: Keith A. Wire | + | Description: Check divide by zero not allowed | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:10:41pm Time updated: 12:10:41pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : nNumerator | + | : nDenominator | + | Return Value: @(nNumerator/nDenominator@) | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftDivide(aAdder, nNumerator,nDenominator) IF nDenominator==0.0 @@ -1051,24 +1051,24 @@ RETURN(nNumerator/nDenominator) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftValDeci() Docs: Keith A. Wire ³ - ³ Description: Validate the number of decimals ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:10:56pm Time updated: þ12:10:56pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: oGet ³ - ³ Return Value: lRtnValue ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftValDeci() Docs: Keith A. Wire | + | Description: Validate the number of decimals | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:10:56pm Time updated: 12:10:56pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: oGet | + | Return Value: lRtnValue | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftValDeci(oGet) LOCAL lRtnValue := .T. IF oGet:VarGet() > 8 - _ftError('no more than 8 decimal places please!') + _ftError("no more than 8 decimal places please!") lRtnValue := .F. ENDIF @@ -1076,18 +1076,18 @@ RETURN lRtnValue -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftDisplayTape() Docs: Keith A. Wire ³ - ³ Description: Display the Tape ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:11:28pm Time updated: þ12:11:28pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: aAdder ³ - ³ : nKey ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftDisplayTape() Docs: Keith A. Wire | + | Description: Display the Tape | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:11:28pm Time updated: 12:11:28pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: aAdder | + | : nKey | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftDisplayTape(aAdder, nKey) LOCAL nDispTape, nTopTape := 1 @@ -1097,7 +1097,7 @@ STATIC FUNCTION _ftDisplayTape(aAdder, nKey) RETU NIL ENDIF IF lTape // Are we in the display mode - SETCOLOR('N/W') + SETCOLOR("N/W") SCROLL(5+nTopOS,7+nTapeSpace,20+nTopOS,32+nTapeSpace,1) IF nTotTran>0 // Any transactions been entered yet? @ 20+nTopOS,7+nTapeSpace SAY aTrans[nTotTran] @@ -1105,19 +1105,19 @@ STATIC FUNCTION _ftDisplayTape(aAdder, nKey) _ftSetWinColor(W_CURR,W_PROMPT) ELSE // Start displaying tape lTape := .T. - SETCOLOR('N/W') + SETCOLOR("N/W") cTapeScr := SAVESCREEN(4+nTopOS,6+nTapeSpace,22+nTopOS,35+nTapeSpace) _ftShadow(22+nTopOS,8+nTapeSpace,22+nTopOS,35+nTapeSpace) _ftShadow(5+nTopOS,33+nTapeSpace,21+nTopOS,35+nTapeSpace) - SETCOLOR('R+/W') + SETCOLOR("R+/W") @ 4+nTopOS,6+nTapeSpace,21+nTopOS,33+nTapeSpace BOX B_SINGLE - SETCOLOR('GR+/W') - @ 4+nTopOS,17+nTapeSpace SAY ' TAPE ' - SETCOLOR('N/W') + SETCOLOR("GR+/W") + @ 4+nTopOS,17+nTapeSpace SAY " TAPE " + SETCOLOR("N/W") IF nTotTran>15 nTopTape := nTotTran-15 ENDIF - FOR nDispTape=nTotTran TO nTopTape STEP -1 + FOR nDispTape := nTotTran TO nTopTape STEP -1 @ 20+nDispTape-nTotTran+nTopOS,7+nTapeSpace SAY aTrans[nDispTape] NEXT ENDIF @@ -1127,19 +1127,19 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftSetLastKey() Docs: Keith A. Wire ³ - ³ Description: Sets the LASTKEY() value to value of nLastKey ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:12:00pm Time updated: þ12:12:00pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: nLastKey ³ - ³ Return Value: NIL ³ - ³ Notes: I use this in most of my Pop-Up routines to reset the ³ - ³ : original value of LASTKEY() when quitting. ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftSetLastKey() Docs: Keith A. Wire | + | Description: Sets the LASTKEY() value to value of nLastKey | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:12:00pm Time updated: 12:12:00pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: nLastKey | + | Return Value: NIL | + | Notes: I use this in most of my Pop-Up routines to reset the | + | : original value of LASTKEY() when quitting. | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftSetLastKey(nLastKey) _ftPushKeys() @@ -1152,18 +1152,18 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPushKeys Docs: Keith A. Wire ³ - ³ Description: Push any keys in the Keyboard buffer on the array aKeys[] ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:16:09pm Time updated: þ12:16:09pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ³ Notes: Save any keys in the buffer... for FAST typists . ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPushKeys Docs: Keith A. Wire | + | Description: Push any keys in the Keyboard buffer on the array aKeys[] | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:16:09pm Time updated: 12:16:09pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + | Notes: Save any keys in the buffer... for FAST typists . | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPushKeys DO WHILE NEXTKEY() != 0 @@ -1175,21 +1175,21 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPopKeys Docs: Keith A. Wire ³ - ³ Description: Restore the keyboard with any keystrokes that were saved ³ - ³ : with _ftPushKeys ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:17:58pm Time updated: þ12:17:58pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPopKeys Docs: Keith A. Wire | + | Description: Restore the keyboard with any keystrokes that were saved | + | : with _ftPushKeys | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:17:58pm Time updated: 12:17:58pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPopKeys - LOCAL cKeys := '' + LOCAL cKeys := "" IF LEN(aKeys) != 0 AEVAL(aKeys, {|elem| cKeys += CHR(elem)}) ENDIF @@ -1198,23 +1198,23 @@ STATIC FUNCTION _ftPopKeys RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPushMessage() Docs: Keith A. Wire ³ - ³ Description: Display a message on the screen in a window ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:18:53pm Time updated: þ12:18:53pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cMessage ³ - ³ : lWait ³ - ³ : cTitle ³ - ³ : cBotTitle ³ - ³ : xQuiet ³ - ³ : nTop ³ - ³ Return Value: NIL ³ - ³ See Also: _ftPopMessage ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPushMessage() Docs: Keith A. Wire | + | Description: Display a message on the screen in a window | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:18:53pm Time updated: 12:18:53pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cMessage | + | : lWait | + | : cTitle | + | : cBotTitle | + | : xQuiet | + | : nTop | + | Return Value: NIL | + | See Also: _ftPopMessage | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPushMessage(cMessage,lWait,cTitle,cBotTitle,xQuiet, nTop) LOCAL nMessLen, nNumRows, nWide, nLeft, nBottom, nRight, nKey, cOldDevic, ; @@ -1224,12 +1224,12 @@ STATIC FUNCTION _ftPushMessage(cMessage,lWait,cTitle,cBotTitle,xQuiet, nTop) nOldRow := ROW(), ; nOldCol := COL(), ; nOldCurs := SETCURSOR(SC_NONE), ; - nWinColor := IF(nWinColor == NIL, W_CURR, nWinColor) + nWinColor := IIF(nWinColor == NIL, W_CURR, nWinColor) - cOldDevic := SET(_SET_DEVICE, 'SCREEN') + cOldDevic := SET(_SET_DEVICE, "SCREEN") lOldPrint := SET(_SET_PRINTER, .F.) nMessLen := LEN(cMessage) - nWide := IF(nMessLen>72,72,IF(nMessLen<12,12,nMessLen)) + nWide := IIF(nMessLen>72,72,IIF(nMessLen<12,12,nMessLen)) nNumRows := MLCOUNT(cMessage,nWide) // If they didn't say what the top row is, Center it on the screen @@ -1238,7 +1238,7 @@ STATIC FUNCTION _ftPushMessage(cMessage,lWait,cTitle,cBotTitle,xQuiet, nTop) nBottom := nTop+nNumRows+2 nLeft := INT((MAXCOL()-nWide)/2)-3 nRight := nLeft+nWide+4 - lWait := IF(lWait == NIL, .F., lWait) + lWait := IIF(lWait == NIL, .F., lWait) _ftPushWin(nTop,nLeft,nBottom,nRight,cTitle,cBotTitle,nWinColor) DISPMESSAGE cMessage,nTop+1,nLeft+2,nBottom-1,nRight-2 @@ -1261,18 +1261,18 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPopMessage Docs: Keith A. Wire ³ - ³ Description: Pop off the Message Box ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:24:22pm Time updated: þ12:24:22pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ³ See Also: _ftPushMessage() ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPopMessage Docs: Keith A. Wire | + | Description: Pop off the Message Box | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:24:22pm Time updated: 12:24:22pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + | See Also: _ftPushMessage() | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPopMessage _ftPopWin() @@ -1281,85 +1281,85 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftQuest() Docs: Keith A. Wire ³ - ³ Description: Push a Question Box on the Screen ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:25:32pm Time updated: þ12:25:32pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cMessage ³ - ³ : xVarVal ³ - ³ : cPict ³ - ³ : bValid ³ - ³ : lNoESC ³ - ³ : nWinColor ³ - ³ : nTop ³ - ³ Return Value: xVarVal ³ - ³ Notes: This function will work for all Data Types ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftQuest() Docs: Keith A. Wire | + | Description: Push a Question Box on the Screen | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:25:32pm Time updated: 12:25:32pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cMessage | + | : xVarVal | + | : cPict | + | : bValid | + | : lNoESC | + | : nWinColor | + | : nTop | + | Return Value: xVarVal | + | Notes: This function will work for all Data Types | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftQuest(cMessage,xVarVal,cPict,bValid,lNoESC,nWinColor,nTop) LOCAL nOldRow, nOldCol, cOldColor, nMessLen, nWide, nNumRows, nBottom, nLeft LOCAL nRight, oNewGet, nNumMessRow, nLenLastRow, lGetOnNextLine, nOldCurs LOCAL cVarType := VALTYPE(xVarVal) - LOCAL nVarLen := IF(cVarType='C',LEN(xVarVal),IF(cVarType='D',8, ; - IF(cVarType='L',1,IF(cVarType='N',IF(cPict=NIL,9, ; + LOCAL nVarLen := IIF(cVarType=="C",LEN(xVarVal),IIF(cVarType=="D",8, ; + IIF(cVarType=="L",1,IIF(cVarType=="N",IIF(cPict==NIL,9, ; LEN(cPict)),0)))) LOCAL nOldLastKey := LASTKEY() LOCAL GETLIST := {}, ; - cOldDevice := SET(_SET_DEVICE, 'SCREEN'), ; + cOldDevice := SET(_SET_DEVICE, "SCREEN"), ; lOldPrint := SET(_SET_PRINTER, .F.) nOldRow := ROW() nOldCol := COL() nOldCurs := SETCURSOR(SC_NONE) cOldColor := SETCOLOR() - lNoESC := IF(lNoESC==NIL,.F.,lNoESC) + lNoESC := IIF(lNoESC==NIL,.F.,lNoESC) nMessLen := LEN(cMessage)+nVarLen+1 - nWide := IF(nMessLen>66,66,IF(nMessLen<12,12,nMessLen)) + nWide := IIF(nMessLen>66,66,IIF(nMessLen<12,12,nMessLen)) nNumMessRow := MLCOUNT(cMessage,nWide) nLenLastRow := LEN(TRIM(MEMOLINE(cMessage,nWide,nNumMessRow))) lGetOnNextLine := (nLenLastRow + nVarLen) > nWide - nNumRows := nNumMessRow + IF(lGetOnNextLine,1,0) + nNumRows := nNumMessRow + IIF(lGetOnNextLine,1,0) // Center it in the screen - nTop := IF(nTop=NIL,INT((MAXROW() - nNumRows)/2),nTop) + nTop := IIF(nTop==NIL,INT((MAXROW() - nNumRows)/2),nTop) nBottom := nTop+nNumRows+1 nLeft := INT((MAXCOL()-nWide)/2)-4 nRight := nLeft+nWide+4 - _ftPushWin(nTop,nLeft,nBottom,nRight,'QUESTION ?',IF(VALTYPE(xVarVal)='C' ; - .AND. nVarLen>nWide,CHR(27)+' scroll '+ CHR(26),NIL),nWinColor) + _ftPushWin(nTop,nLeft,nBottom,nRight,"QUESTION ?",IIF(VALTYPE(xVarVal)=="C" ; + .AND. nVarLen>nWide,CHR(27)+" scroll "+ CHR(26),NIL),nWinColor) DISPMESSAGE cMessage,nTop+1,nLeft+2,nBottom-1,nRight-2 - oNewGet := GetNew( IF(lGetOnNextLine,Row()+1,Row()), ; - IF(lGetOnNextLine,nLeft+2,Col()+1), ; - {|x| IF(PCOUNT() > 0, xVarVal := x, xVarVal)}, ; - 'xVarVal' ) + oNewGet := GetNew( IIF(lGetOnNextLine,Row()+1,Row()), ; + IIF(lGetOnNextLine,nLeft+2,Col()+1), ; + {|x| IIF(PCOUNT() > 0, xVarVal := x, xVarVal)}, ; + "xVarVal" ) // If the input line is character & wider than window SCROLL - IF lGetOnNextLine .AND. VALTYPE(xVarVal)='C' .AND. nVarLen>nWide - oNewGet:Picture := '@S'+LTRIM(STR(nWide,4,0))+IF(cPict=NIL,'',' '+cPict) + IF lGetOnNextLine .AND. VALTYPE(xVarVal)=="C" .AND. nVarLen>nWide + oNewGet:Picture := "@S"+LTRIM(STR(nWide,4,0))+IIF(cPict==NIL,""," "+cPict) ENDIF IF cPict != NIL // Use the picture they passed oNewGet:Picture := cPict ELSE // Else setup default pictures - IF VALTYPE(xVarVal)='D' - oNewGet:Picture := '99/99/99' - ELSEIF VALTYPE(xVarVal)='L' - oNewGet:Picture := 'Y' - ELSEIF VALTYPE(xVarVal)='N' - oNewGet:Picture := '999999.99' // Guess that they are inputting dollars + IF VALTYPE(xVarVal)=="D" + oNewGet:Picture := "99/99/99" + ELSEIF VALTYPE(xVarVal)=="L" + oNewGet:Picture := "Y" + ELSEIF VALTYPE(xVarVal)=="N" + oNewGet:Picture := "999999.99" // Guess that they are inputting dollars ENDIF ENDIF - oNewGet:PostBlock := IF(bValid=NIL,NIL,bValid) + oNewGet:PostBlock := IIF(bValid==NIL,NIL,bValid) oNewGet:Display() @@ -1368,7 +1368,7 @@ STATIC FUNCTION _ftQuest(cMessage,xVarVal,cPict,bValid,lNoESC,nWinColor,nTop) // without reissuing the gets ReadModal({oNewGet}) IF LASTKEY() == K_ESC .AND. lNoESC // They pressed - _ftError('you cannot Abort! Please enter an answer.') + _ftError("you cannot Abort! Please enter an answer.") ELSE EXIT ENDIF @@ -1388,19 +1388,19 @@ RETURN xVarVal -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftAdderTapeUDF() Docs: Keith A. Wire ³ - ³ Description: User function for ACHOICE() when scrolling tape ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:26:44pm Time updated: þ12:26:44pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: mode ³ - ³ : cur_elem ³ - ³ : rel_pos ³ - ³ Return Value: nRtnVal ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftAdderTapeUDF() Docs: Keith A. Wire | + | Description: User function for ACHOICE() when scrolling tape | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:26:44pm Time updated: 12:26:44pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: mode | + | : cur_elem | + | : rel_pos | + | Return Value: nRtnVal | + +--------------------------------------------------------------------------+ */ FUNCTION _ftAdderTapeUDF(mode,cur_elem,rel_pos) LOCAL nKey,nRtnVal @@ -1433,35 +1433,35 @@ RETURN nRtnVal -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftError() Docs: Keith A. Wire ³ - ³ Description: Display an ERROR message in a window ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:27:43pm Time updated: þ12:27:43pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cMessage ³ - ³ : xDontReset ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftError() Docs: Keith A. Wire | + | Description: Display an ERROR message in a window | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:27:43pm Time updated: 12:27:43pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cMessage | + | : xDontReset | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftError(cMessage, xDontReset) LOCAL nOldRow,nOldCol,nOldCurs,nTop,nLeft,nBot,nRight,cOldColor, ; nOldLastKey,cErrorScr,nMessLen,nWide,nNumRows,nKey, ; cOldDevic,lOldPrint, ; - lResetLKey := IF(xDontReset==NIL, .T., .F.) + lResetLKey := IIF(xDontReset==NIL, .T., .F.) nOldLastKey := LASTKEY() nOldRow := ROW() nOldCol := COL() nOldCurs := SETCURSOR(SC_NONE) cOldColor:= _ftSetSCRColor(STD_ERROR) - cOldDevic := SET(_SET_DEVICE, 'SCREEN') + cOldDevic := SET(_SET_DEVICE, "SCREEN") lOldPrint := SET(_SET_PRINTER, .F.) cMessage := "I'm sorry but, " + cMessage nMessLen := LEN(cMessage) - nWide := IF(nMessLen>66,66,IF(nMessLen<12,12,nMessLen)) + nWide := IIF(nMessLen>66,66,IIF(nMessLen<12,12,nMessLen)) nNumRows := MLCOUNT(cMessage,nWide) nTop := INT((MAXROW() - nNumRows)/2) // Center it in the screen nBot := nTop+3+nNumRows @@ -1472,8 +1472,8 @@ STATIC FUNCTION _ftError(cMessage, xDontReset) _ftShadow(nBot+1,nLeft+2,nBot+1,nRight+2,8) _ftShadow(nTop+1,nRight+1,nBot ,nRight+2,8) @ nTop,nLeft,nBot,nRight BOX B_SINGLE - @ nTop,nLeft+INT(nWide/2)-1 SAY ' ERROR ' - @ nBot-1,nLeft+INT(nWide-28)/2+3 SAY 'Press any key to continue...' + @ nTop,nLeft+INT(nWide/2)-1 SAY " ERROR " + @ nBot-1,nLeft+INT(nWide-28)/2+3 SAY "Press any key to continue..." DISPMESSAGE cMessage,nTop+1,nLeft+3,nBot-2,nRight-3 TONE(70,5) FT_INKEY 0 TO nKey @@ -1494,30 +1494,30 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftStuffComma() Docs: Keith A. Wire ³ - ³ Description: Stuff a Comma in a string ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:28:19pm Time updated: þ12:28:19pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cStrToStuff ³ - ³ : lTrimStuffedStr ³ - ³ Return Value: cStrToStuff ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftStuffComma() Docs: Keith A. Wire | + | Description: Stuff a Comma in a string | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:28:19pm Time updated: 12:28:19pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cStrToStuff | + | : lTrimStuffedStr | + | Return Value: cStrToStuff | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftStuffComma(cStrToStuff,lTrimStuffedStr) LOCAL nDecPosit, x, ; nOrLen := LEN(cStrToStuff) - lTrimStuffedStr := IF(lTrimStuffedStr=NIL,.F.,lTrimStuffedStr) - IF !('.' $ cStrToStuff) - cStrToStuff := _ftPosIns(cStrToStuff,'.',IF('C'$cStrToStuff .OR. ; - 'E'$cStrToStuff .OR. '+'$cStrToStuff .OR. '-'$cStrToStuff ; - .OR. 'X'$cStrToStuff .OR. '*'$cStrToStuff .OR. ; - ''$cStrToStuff .OR. '/'$cStrToStuff .OR. '='$cStrToStuff,; + lTrimStuffedStr := IIF(lTrimStuffedStr==NIL,.F.,lTrimStuffedStr) + IF !("." $ cStrToStuff) + cStrToStuff := _ftPosIns(cStrToStuff,".",IIF("C"$cStrToStuff .OR. ; + "E"$cStrToStuff .OR. "+"$cStrToStuff .OR. "-"$cStrToStuff ; + .OR. "X"$cStrToStuff .OR. "*"$cStrToStuff .OR. ; + ""$cStrToStuff .OR. "/"$cStrToStuff .OR. "="$cStrToStuff,; LEN(cStrToStuff)-1,LEN(cStrToStuff)+1)) IF ASC(cStrToStuff) == K_SPACE .OR. ASC(cStrToStuff) == K_ZERO @@ -1525,17 +1525,17 @@ STATIC FUNCTION _ftStuffComma(cStrToStuff,lTrimStuffedStr) ENDIF ENDIF - nDecPosit := AT('.',cStrToStuff) + nDecPosit := AT(".",cStrToStuff) - IF LEN(LEFT(LTRIM(_ftCharRem('-',cStrToStuff)), ; - AT('.',LTRIM(_ftCharRem('-',cStrToStuff)))-1))>3 + IF LEN(LEFT(LTRIM(_ftCharRem("-",cStrToStuff)), ; + AT(".",LTRIM(_ftCharRem("-",cStrToStuff)))-1))>3 IF lTrimStuffedStr // Do we trim the number each time we insert a comma - FOR x=nDecPosit-3 TO 2+_ftCountLeft(cStrToStuff,' ') STEP -4 - cStrToStuff := SUBSTR(_ftPosIns(cStrToStuff,',',x),2) + FOR x := nDecPosit-3 TO 2+_ftCountLeft(cStrToStuff," ") STEP -4 + cStrToStuff := SUBSTR(_ftPosIns(cStrToStuff,",",x),2) NEXT ELSE - FOR x=nDecPosit-3 TO 2+_ftCountLeft(cStrToStuff,' ') STEP -3 - cStrToStuff := _ftPosIns(cStrToStuff,',',x) + FOR x := nDecPosit-3 TO 2+_ftCountLeft(cStrToStuff," ") STEP -3 + cStrToStuff := _ftPosIns(cStrToStuff,",",x) NEXT ENDIF ENDIF @@ -1546,24 +1546,24 @@ RETURN cStrToStuff -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftSetSCRColor() Docs: Keith A. Wire ³ - ³ Description: Set the standard screen colors to the color requested. ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:28:48pm Time updated: þ12:28:48pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: nStd ³ - ³ : nEnh ³ - ³ : nBord ³ - ³ : nBack ³ - ³ : nUnsel ³ - ³ Return Value: SETCOLOR(aStdColor[nStd] + ',' + aStdColor[nEnh] + ',' + ; ³ - ³ : aStdColor[nBord] + ',' + aStdColor[nBack] + ',' + ; ³ - ³ : aStdColor[nUnsel]) ³ - ³ See Also: _ftSetWinColor() ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftSetSCRColor() Docs: Keith A. Wire | + | Description: Set the standard screen colors to the color requested. | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:28:48pm Time updated: 12:28:48pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: nStd | + | : nEnh | + | : nBord | + | : nBack | + | : nUnsel | + | Return Value: SETCOLOR(aStdColor[nStd] + "," + aStdColor[nEnh] + "," + ; | + | : aStdColor[nBord] + "," + aStdColor[nBack] + "," + ; | + | : aStdColor[nUnsel]) | + | See Also: _ftSetWinColor() | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftSetSCRColor(nStd,nEnh,nBord,nBack,nUnsel) @@ -1571,56 +1571,56 @@ STATIC FUNCTION _ftSetSCRColor(nStd,nEnh,nBord,nBack,nUnsel) _ftInitColors() ENDIF - nStd := IF(nStd == NIL, 8, nStd) - nEnh := IF(nEnh == NIL, 8, nEnh) - nBord := IF(nBord == NIL, 8, nBord) - nBack := IF(nBack == NIL, 8, nBack) - nUnsel:= IF(nUnsel == NIL, nEnh, nUnsel) + nStd := IIF(nStd == NIL, 8, nStd) + nEnh := IIF(nEnh == NIL, 8, nEnh) + nBord := IIF(nBord == NIL, 8, nBord) + nBack := IIF(nBack == NIL, 8, nBack) + nUnsel:= IIF(nUnsel == NIL, nEnh, nUnsel) -RETURN SETCOLOR(aStdColor[nStd]+','+aStdColor[nEnh]+','+aStdColor[nBord]+','+; - aStdColor[nBack]+','+aStdColor[nUnsel]) +RETURN SETCOLOR(aStdColor[nStd]+","+aStdColor[nEnh]+","+aStdColor[nBord]+","+; + aStdColor[nBack]+","+aStdColor[nUnsel]) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPushWin() Docs: Keith A. Wire ³ - ³ Description: Push a new window on the screen ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:34:38pm Time updated: þ12:34:38pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: t ³ - ³ : l ³ - ³ : b ³ - ³ : r ³ - ³ : cTitle ³ - ³ : cBotTitle ³ - ³ : nWinColor ³ - ³ Return Value: NIL ³ - ³ See Also: ³ - ³ Notes: Push a new window on the screen in the position t,l,b,r ³ - ³ : and if cTitle is not NIL print the title for the window ³ - ³ : in centered in the top line of the box. Similarly do ³ - ³ : the same for cBotTitle. If nWinColor=NIL get the next ³ - ³ : window color and use it for all the colors. If ³ - ³ : cTypeBord=NIL use the single line border, else use the ³ - ³ : one they requested. Push the window coordinates, the ³ - ³ : color number, the SAVESCREEN() value, and whether they ³ - ³ : picked the window color they wanted to use. If ³ - ³ : lAutoWindow=.F. then the window color was incremented ³ - ³ : and we will will restore the color number when we pop ³ - ³ : the window off. ³ - ³ : ³ - ³ : nWinColor DEFAULT == _ftNextWinColor() ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPushWin() Docs: Keith A. Wire | + | Description: Push a new window on the screen | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:34:38pm Time updated: 12:34:38pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: t | + | : l | + | : b | + | : r | + | : cTitle | + | : cBotTitle | + | : nWinColor | + | Return Value: NIL | + | See Also: | + | Notes: Push a new window on the screen in the position t,l,b,r | + | : and if cTitle is not NIL print the title for the window | + | : in centered in the top line of the box. Similarly do | + | : the same for cBotTitle. If nWinColor==NIL get the next | + | : window color and use it for all the colors. If | + | : cTypeBord==NIL use the single line border, else use the | + | : one they requested. Push the window coordinates, the | + | : color number, the SAVESCREEN() value, and whether they | + | : picked the window color they wanted to use. If | + | : lAutoWindow=.F. then the window color was incremented | + | : and we will will restore the color number when we pop | + | : the window off. | + | : | + | : nWinColor DEFAULT == _ftNextWinColor() | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPushWin(t,l,b,r,cTitle,cBotTitle,nWinColor) LOCAL lAutoWindow := nWinColor==NIL - nWinColor := IF(nWinColor=NIL,_ftNextWinColor(),nWinColor) + nWinColor := IIF(nWinColor==NIL,_ftNextWinColor(),nWinColor) AADD(aWindow,{t,l,b,r,nWinColor,SAVESCREEN(t,l,b+1,r+2),lAutoWindow}) _ftShadow(b+1,l+2,b+1,r+2) _ftShadow(t+1,r+1,b,r+2) @@ -1634,7 +1634,7 @@ STATIC FUNCTION _ftPushWin(t,l,b,r,cTitle,cBotTitle,nWinColor) IF cBotTitle!=NIL _ftSetWinColor(nWinColor,W_TITLE) - _ftWinTitle(cBotTitle,'bot') + _ftWinTitle(cBotTitle,"bot") ENDIF _ftSetWinColor(nWinColor,W_SCREEN,W_VARIAB) @@ -1645,22 +1645,22 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPopWin Docs: Keith A. Wire ³ - ³ Description: Pop a Window off the screen ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 12:52:34pm Time updated: þ12:52:34pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ³ Notes: Pop the currently active window off the screen by restoring³ - ³ : it from the aWindow Array and if they pushed a new window³ - ³ : automatically selecting the color we will roll back the ³ - ³ : current window setting using _ftLastWinColor() and reset ³ - ³ : the color to the color setting when window was pushed. ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPopWin Docs: Keith A. Wire | + | Description: Pop a Window off the screen | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 12:52:34pm Time updated: 12:52:34pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + | Notes: Pop the currently active window off the screen by restoring| + | : it from the aWindow Array and if they pushed a new window| + | : automatically selecting the color we will roll back the | + | : current window setting using _ftLastWinColor() and reset | + | : the color to the color setting when window was pushed. | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPopWin @@ -1688,60 +1688,60 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftSetWinColor() Docs: Keith A. Wire ³ - ³ Description: Set the Color to the Window Colors requested ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:37:32pm Time updated: þ01:37:32pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: nWin ³ - ³ : nStd ³ - ³ : nEnh ³ - ³ : nBord ³ - ³ : nBack ³ - ³ : nUnsel ³ - ³ Return Value:SETCOLOR(aWinColor[nStd,nWin]+','+aWinColor[nEnh,nWin]+','+;³ - ³ : aWinColor[nBord,nWin]+','+aWinColor[nBack,nWin]+','+ ;³ - ³ : aWinColor[nUnsel,nWin]) ³ - ³ See Also: _ftSetSCRColor() ³ - ³ Notes: If the window number is not passed use the currently active³ - ³ : window number nWinColor. ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftSetWinColor() Docs: Keith A. Wire | + | Description: Set the Color to the Window Colors requested | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:37:32pm Time updated: 01:37:32pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: nWin | + | : nStd | + | : nEnh | + | : nBord | + | : nBack | + | : nUnsel | + | Return Value:SETCOLOR(aWinColor[nStd,nWin]+","+aWinColor[nEnh,nWin]+","+;| + | : aWinColor[nBord,nWin]+","+aWinColor[nBack,nWin]+","+ ;| + | : aWinColor[nUnsel,nWin]) | + | See Also: _ftSetSCRColor() | + | Notes: If the window number is not passed use the currently active| + | : window number nWinColor. | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftSetWinColor(nWin,nStd,nEnh,nBord,nBack,nUnsel) - nWin := IF(nWin == NIL, nWinColor, nWin) - nStd := IF(nStd == NIL, 7, nStd) - nEnh := IF(nEnh == NIL, 7, nEnh) - nBord := IF(nBord == NIL, 7, nBord) - nBack := IF(nBack == NIL, 7, nBack) - nUnsel:= IF(nUnsel == NIL, nEnh, nUnsel) + nWin := IIF(nWin == NIL, nWinColor, nWin) + nStd := IIF(nStd == NIL, 7, nStd) + nEnh := IIF(nEnh == NIL, 7, nEnh) + nBord := IIF(nBord == NIL, 7, nBord) + nBack := IIF(nBack == NIL, 7, nBack) + nUnsel:= IIF(nUnsel == NIL, nEnh, nUnsel) -RETURN SETCOLOR(aWinColor[nStd,nWin]+','+aWinColor[nEnh,nWin]+','+ ; - aWinColor[nBord,nWin]+','+aWinColor[nBack,nWin]+','+aWinColor[nUnsel,nWin]) +RETURN SETCOLOR(aWinColor[nStd,nWin]+","+aWinColor[nEnh,nWin]+","+ ; + aWinColor[nBord,nWin]+","+aWinColor[nBack,nWin]+","+aWinColor[nUnsel,nWin]) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftShadow() Docs: Keith A. Wire ³ - ³ Description: Create a shadow on the screen in the coordinates given ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:40:56pm Time updated: þ01:40:56pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: nTop ³ - ³ : nLeft ³ - ³ : nBottom ³ - ³ : nRight ³ - ³ Return Value: NIL ³ - ³ See Also: _ftPushWin() ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftShadow() Docs: Keith A. Wire | + | Description: Create a shadow on the screen in the coordinates given | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:40:56pm Time updated: 01:40:56pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: nTop | + | : nLeft | + | : nBottom | + | : nRight | + | Return Value: NIL | + | See Also: _ftPushWin() | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftShadow( nTop, nLeft, nBottom, nRight ) @@ -1756,171 +1756,171 @@ RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftLastWinColor Docs: Keith A. Wire ³ - ³ Description: Decrement the active window color number and return the ³ - ³ : current value ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:49:19pm Time updated: þ01:49:19pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: nWinColor := IF(nWinColor=1,4,nWinColor-1) ³ - ³ Notes: If we are already on window #1 restart count by using # 4. ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftLastWinColor Docs: Keith A. Wire | + | Description: Decrement the active window color number and return the | + | : current value | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:49:19pm Time updated: 01:49:19pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: nWinColor := IIF(nWinColor==1,4,nWinColor-1) | + | Notes: If we are already on window #1 restart count by using # 4. | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftLastWinColor -RETURN nWinColor := IF(nWinColor=1,4,nWinColor-1) +RETURN nWinColor := IIF(nWinColor==1,4,nWinColor-1) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftNextWinColor Docs: Keith A. Wire ³ - ³ Description: Increment the active window color number and return the ³ - ³ : current value ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:51:12pm Time updated: þ01:51:12pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: nWinColor := (IF(nWinColor<4,nWinColor+1,1)) ³ - ³ Notes: If we are already on window #4 restart count by using # 1. ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftNextWinColor Docs: Keith A. Wire | + | Description: Increment the active window color number and return the | + | : current value | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:51:12pm Time updated: 01:51:12pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: nWinColor := (IIF(nWinColor<4,nWinColor+1,1)) | + | Notes: If we are already on window #4 restart count by using # 1. | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftNextWinColor IF EMPTY(aWinColor) _ftInitColors() ENDIF -RETURN nWinColor := (IF(nWinColor<4,nWinColor+1,1)) +RETURN nWinColor := (IIF(nWinColor<4,nWinColor+1,1)) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftWinTitle() Docs: Keith A. Wire ³ - ³ Description: Print the top or bottom titles on the border of the ³ - ³ : currently active window. ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:52:29pm Time updated: þ01:52:29pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cTheTitle ³ - ³ : cTopOrBot ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftWinTitle() Docs: Keith A. Wire | + | Description: Print the top or bottom titles on the border of the | + | : currently active window. | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:52:29pm Time updated: 01:52:29pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cTheTitle | + | : cTopOrBot | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftWinTitle(cTheTitle,cTopOrBot) LOCAL nCurWin :=LEN(aWindow), ; nLenTitle:=LEN(cTheTitle) - @ aWindow[nCurWin,IF(cTopOrBot=NIL,1,3)],(aWindow[nCurWin,4]- ; - aWindow[nCurWin,2]-nLenTitle)/2+aWindow[nCurWin,2] SAY ' '+cTheTitle+' ' + @ aWindow[nCurWin,IIF(cTopOrBot==NIL,1,3)],(aWindow[nCurWin,4]- ; + aWindow[nCurWin,2]-nLenTitle)/2+aWindow[nCurWin,2] SAY " "+cTheTitle+" " RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftInitColors Docs: Keith A. Wire ³ - ³ Description: Initilize the colors for the Adder ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 02:59:58pm Time updated: þ02:59:58pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: None ³ - ³ Return Value: NIL ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftInitColors Docs: Keith A. Wire | + | Description: Initilize the colors for the Adder | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 02:59:58pm Time updated: 02:59:58pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: None | + | Return Value: NIL | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftInitColors - aWinColor := { {'GR+/BG','GR+/G', 'B+/RB', 'G+/R'} , ; - {'R+/N', 'W+/RB','W+/BG','GR+/B'} , ; - {'GR+/N', 'GR+/N','GR+/N', 'GR+/N'} , ; - { 'B/BG','BG+/G', 'W+/RB','BG+/R'} , ; - { 'W+/BG', 'W+/G','GR+/RB', 'W+/R'} , ; - {'GR+/B', 'GR+/R', 'R+/B', 'W+/BG'}, ; - { 'N/N', 'N/N', 'N/N', 'N/N'} } + aWinColor := { {"GR+/BG","GR+/G", "B+/RB", "G+/R"} , ; + {"R+/N", "W+/RB","W+/BG","GR+/B"} , ; + {"GR+/N", "GR+/N","GR+/N", "GR+/N"} , ; + { "B/BG","BG+/G", "W+/RB","BG+/R"} , ; + { "W+/BG", "W+/G","GR+/RB", "W+/R"} , ; + {"GR+/B", "GR+/R", "R+/B", "W+/BG"}, ; + { "N/N", "N/N", "N/N", "N/N"} } - aStdColor := { 'BG+*/RB' , ; - 'GR+/R' , ; - 'GR+/N' , ; - 'W/B' , ; - 'GR+/N' , ; - 'GR+/GR' , ; - { 'W+/B', 'W/B','G+/B','R+/B', ; - 'GR+/B','BG+/B','B+/B','G+/B'}, ; - 'N/N' } + aStdColor := { "BG+*/RB" , ; + "GR+/R" , ; + "GR+/N" , ; + "W/B" , ; + "GR+/N" , ; + "GR+/GR" , ; + { "W+/B", "W/B","G+/B","R+/B", ; + "GR+/B","BG+/B","B+/B","G+/B"}, ; + "N/N" } RETURN NIL -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftCharOdd() Docs: Keith A. Wire ³ - ³ Description: Remove all the even numbered characters in a string. ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:41:50pm Time updated: þ01:41:50pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cString ³ - ³ Return Value: STRTRAN(cString,'') ³ - ³ Notes: Used for example to strip all the attribute characters ³ - ³ : from a screen save. ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftCharOdd() Docs: Keith A. Wire | + | Description: Remove all the even numbered characters in a string. | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:41:50pm Time updated: 01:41:50pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cString | + | Return Value: STRTRAN(cString,"") | + | Notes: Used for example to strip all the attribute characters | + | : from a screen save. | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftCharOdd(cString) cString := TRANSFORM(cString,REPLICATE("X", LEN(cString)/2 ) ) -RETURN STRTRAN(cString,'') +RETURN STRTRAN(cString,"") -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPosRepl() Docs: Keith A. Wire ³ - ³ Description: Replace the Character at nPosit in cString with cChar ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:44:21pm Time updated: þ01:44:21pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cString ³ - ³ : cChar ³ - ³ : nPosit ³ - ³ Return Value: STRTRAN(cString,'9',cChar,nPosit,1)+'' ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPosRepl() Docs: Keith A. Wire | + | Description: Replace the Character at nPosit in cString with cChar | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:44:21pm Time updated: 01:44:21pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cString | + | : cChar | + | : nPosit | + | Return Value: STRTRAN(cString,"9",cChar,nPosit,1)+"" | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPosRepl(cString,cChar,nPosit) -RETURN STRTRAN(cString,'9',cChar,nPosit,1)+'' +RETURN STRTRAN(cString,"9",cChar,nPosit,1)+"" -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftCharRem() Docs: Keith A. Wire ³ - ³ Description: Removes all occurances of cChar from cString. ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:45:41pm Time updated: þ01:45:41pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cChar ³ - ³ : cString ³ - ³ Return Value: STRTRAN(cString,cChar) ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftCharRem() Docs: Keith A. Wire | + | Description: Removes all occurances of cChar from cString. | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:45:41pm Time updated: 01:45:41pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cChar | + | : cString | + | Return Value: STRTRAN(cString,cChar) | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftCharRem(cChar,cString) RETURN STRTRAN(cString,cChar) @@ -1932,17 +1932,17 @@ RETURN STRTRAN(cString,cChar) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftCountLeft() Docs: Keith A. Wire ³ - ³ Description: Returns the number of spaces on the Left side of the String³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:47:00pm Time updated: þ01:47:00pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cString ³ - ³ Return Value: LEN(cString)-LEN(LTRIM(cString)) ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftCountLeft() Docs: Keith A. Wire | + | Description: Returns the number of spaces on the Left side of the String| + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:47:00pm Time updated: 01:47:00pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cString | + | Return Value: LEN(cString)-LEN(LTRIM(cString)) | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftCountLeft(cString) RETURN LEN(cString)-LEN(LTRIM(cString)) @@ -1951,19 +1951,19 @@ RETURN LEN(cString)-LEN(LTRIM(cString)) -/*ÚÄ Function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - ³ Name: _ftPosIns() Docs: Keith A. Wire ³ - ³ Description: Insert the Character cChar in cString at position nPosit ³ - ³ Author: Keith A. Wire ³ - ³ Date created: 10-03-93 Date updated: þ10-03-93 ³ - ³ Time created: 01:48:30pm Time updated: þ01:48:30pm ³ - ³ Copyright: None - Public Domain ³ - ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - ³ Arguments: cString ³ - ³ : cChar ³ - ³ : nPosit ³ - ³ Return Value: LEFT(cString,nPosit-1)+cChar+SUBSTR(cString,nPosit) ³ - ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +/*+- Function ---------------------------------------------------------------+ + | Name: _ftPosIns() Docs: Keith A. Wire | + | Description: Insert the Character cChar in cString at position nPosit | + | Author: Keith A. Wire | + | Date created: 10-03-93 Date updated: 10-03-93 | + | Time created: 01:48:30pm Time updated: 01:48:30pm | + | Copyright: None - Public Domain | + +--------------------------------------------------------------------------+ + | Arguments: cString | + | : cChar | + | : nPosit | + | Return Value: LEFT(cString,nPosit-1)+cChar+SUBSTR(cString,nPosit) | + +--------------------------------------------------------------------------+ */ STATIC FUNCTION _ftPosIns(cString,cChar,nPosit) RETURN LEFT(cString,nPosit-1)+cChar+SUBSTR(cString,nPosit) diff --git a/harbour/contrib/hbnf/sleep.prg b/harbour/contrib/hbnf/sleep.prg index b2c7ac94d9..a162f1ce49 100644 --- a/harbour/contrib/hbnf/sleep.prg +++ b/harbour/contrib/hbnf/sleep.prg @@ -74,8 +74,8 @@ * Example 1: * FT_SLEEP(10.0) && Sleep for 10.0 seconds * Example 2: - * nTime=SECONDS() && usually after some interupt from mouse or - * && keyboard + * nTime := SECONDS() && usually after some interupt from mouse or + * && keyboard * * ... intervening code ... * diff --git a/harbour/contrib/hbnf/xbox.prg b/harbour/contrib/hbnf/xbox.prg index a454f20e91..e8d8a6200e 100644 --- a/harbour/contrib/hbnf/xbox.prg +++ b/harbour/contrib/hbnf/xbox.prg @@ -179,9 +179,9 @@ FUNCTION FT_XBOX(cJustType,; // "L" = left, otherwise centered AEVAL(aLines_,{|| nLLen:=Max(nLLen,Len(aLines_[nLoop])),nLoop++}) // calculate corners - nLCol = if(nStartCol=99,Int((76-nLLen)/2),Min(nStartCol,74-nLLen)) + nLCol = if(nStartCol==99,Int((76-nLLen)/2),Min(nStartCol,74-nLLen)) nRCol = nLCol+nLLen+3 - nTRow = if(nStartRow=99,INT((24-nNumRows)/2),Min(nStartRow,22-nNumRows)) + nTRow = if(nStartRow==99,INT((24-nNumRows)/2),Min(nStartRow,22-nNumRows)) nBRow = nTRow+nNumRows+1 // form box and border diff --git a/harbour/contrib/hbtip/ftpcln.prg b/harbour/contrib/hbtip/ftpcln.prg index f795436d6d..5f364eea09 100644 --- a/harbour/contrib/hbtip/ftpcln.prg +++ b/harbour/contrib/hbtip/ftpcln.prg @@ -630,7 +630,7 @@ METHOD MGET( cSpec,cLocalPath ) CLASS tIPClientFTP IF cSpec == nil cSpec := "" ENDIF - IF cLocalPath=nil + IF cLocalPath == nil cLocalPath:="" ENDIF IF ::bUsePasv diff --git a/harbour/contrib/hbtip/httpcln.prg b/harbour/contrib/hbtip/httpcln.prg index 4004045885..81caf5f1b4 100644 --- a/harbour/contrib/hbtip/httpcln.prg +++ b/harbour/contrib/hbtip/httpcln.prg @@ -365,7 +365,7 @@ METHOD ReadAll() CLASS tIPClientHTTP ENDIF IF ::bChunked cChunk:=::read() - while cChunk!=nil + while cChunk != nil cOut+=cChunk // ::nLength:=-1 cChunk:=::read() @@ -393,8 +393,8 @@ METHOD setCookie(cLine) CLASS tIPClientHTTP y:=len(aParam) FOR x:=1 to y aElements := HB_RegexSplit( "=", aParam[x], 1) - IF len(aElements)==2 - IF x=1 + IF len(aElements) == 2 + IF x == 1 cName:=alltrim(aElements[1]) cValue:=alltrim(aElements[2]) else @@ -425,10 +425,10 @@ return NIL METHOD getcookies(cHost,cPath) CLASS tIPClientHTTP local x,y,aDomKeys:={},aKeys,z,cKey,aPathKeys,nPath local a, b, cOut := "", c, d - IF cHost=nil + IF cHost == nil cHost:=::oUrl:cServer ENDIF - IF cPath=nil + IF cPath == nil cPath:=::oUrl:cPath IF empty(cPath) cPath:="/" @@ -493,8 +493,8 @@ METHOD Boundary(nType) CLASS tIPClientHTTP local cBound:=::cBoundary LOCAL i - IF nType=nil - nType=0 + IF nType == nil + nType := 0 ENDIF IF empty(cBound) cBound:=replicate("-",27)+space(11) @@ -503,7 +503,7 @@ METHOD Boundary(nType) CLASS tIPClientHTTP NEXT ::cBoundary:=cBound endif - cBound:=iif(nType<2,"--","")+cBound+if(nType=1,"--","") + cBound:=iif(nType<2,"--","")+cBound+if(nType == 1,"--","") RETURN(cBound) METHOD Attach(cName,cFileName,cType) CLASS tIPClientHTTP @@ -571,8 +571,8 @@ METHOD PostMultiPart( cPostData, cQuery ) CLASS tIPClientHTTP nbuf:=8192 nRead:=nBuf cBuf:=space(nBuf) - while nRead=nBuf - //nRead=FRead( nFile,@cBuf,nBuf) + while nRead == nBuf + //nRead := FRead( nFile,@cBuf,nBuf) cBuf:=FReadstr( nFile,nBuf) nRead:=len(cBuf) /* IF nRead 12 .or. ; - at( ' ', cFile ) > 0 .or. ; - ( at( ' ', cFile ) == 0 .and. len( cFile ) > 8 ) .or. ; - ( ( nAt := at( '.', cFile )) > 0 .and. len( substr( cFile, nAt + 1 )) > 3 ) + at( " ", cFile ) > 0 .or. ; + ( at( " ", cFile ) == 0 .and. len( cFile ) > 8 ) .or. ; + ( ( nAt := at( ".", cFile )) > 0 .and. len( substr( cFile, nAt + 1 )) > 3 ) cCmd := "copy " + cFile + " temp.tmp > nul" RunExternal( cCmd ) @@ -1250,7 +1250,7 @@ METHOD SaveHeader( cFile ) local nErrorCode := 0, cCmd -Array2File( 'temp.tmp', ::aReport[ HEADER ] ) +Array2File( "temp.tmp", ::aReport[ HEADER ] ) cCmd := "copy temp.tmp " + cFile + " > nul" RunExternal( cCmd ) @@ -1643,7 +1643,7 @@ METHOD tPdf:ImageInfo( cFile ) METHOD ImageInfo( cFile ) #endif -local cTemp := upper(substr( cFile, rat('.', cFile) + 1 )), aTemp := {} +local cTemp := upper(substr( cFile, rat(".", cFile) + 1 )), aTemp := {} do case case cTemp == "TIF" aTemp := ::TIFFInfo( cFile ) @@ -1670,11 +1670,11 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0 nHandle := fopen( cFile ) - c2 := ' ' + c2 := " " fread( nHandle, @c2, 2 ) fread( nHandle, @c2, 2 ) - cIFDNext := ' ' + cIFDNext := " " fread( nHandle, @cIFDNext, 4 ) cTemp := space(12) @@ -1712,10 +1712,10 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0 IF nFieldType == ASCII --nCount ENDIF - cTag := '' + cTag := "" do case case nTag == 256 - cTag := 'ImageWidth' + cTag := "ImageWidth" IF nFieldType == SHORT nWidth := bin2w( substr( cValues, 1, 2 )) @@ -1724,7 +1724,7 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0 ENDIF case nTag == 257 - cTag := 'ImageLength' + cTag := "ImageLength" IF nFieldType == SHORT nHeight := bin2w(substr( cValues, 1, 2 )) ELSEIF nFieldType == LONG @@ -1732,32 +1732,32 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0 ENDIF case nTag == 258 - cTag := 'BitsPerSample' + cTag := "BitsPerSample" nTemp := 0 IF nFieldType == SHORT nTemp := bin2w( cValues ) ENDIF nBits := nTemp case nTag == 259 - cTag := 'Compression' + cTag := "Compression" nTemp := 0 IF nFieldType == SHORT nTemp := bin2w( cValues ) ENDIF case nTag == 262 - cTag := 'PhotometricInterpretation' + cTag := "PhotometricInterpretation" nTemp := -1 IF nFieldType == SHORT nTemp := bin2w( cValues ) ENDIF case nTag == 264 - cTag := 'CellWidth' + cTag := "CellWidth" case nTag == 265 - cTag := 'CellLength' + cTag := "CellLength" case nTag == 266 - cTag := 'FillOrder' + cTag := "FillOrder" case nTag == 273 - cTag := 'StripOffsets' + cTag := "StripOffsets" IF nFieldType == SHORT nFrom := bin2w(substr( cValues, 1, 2 )) ELSEIF nFieldType == LONG @@ -1765,11 +1765,11 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0 ENDIF case nTag == 277 - cTag := 'SamplesPerPixel' + cTag := "SamplesPerPixel" case nTag == 278 - cTag := 'RowsPerStrip' + cTag := "RowsPerStrip" case nTag == 279 - cTag := 'StripByteCounts' + cTag := "StripByteCounts" IF nFieldType == SHORT nLength := bin2w(substr( cValues, 1, 2 )) ELSEIF nFieldType == LONG @@ -1779,37 +1779,37 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0 nLength *= nCount // Count all strips !!! case nTag == 282 - cTag := 'XResolution' + cTag := "XResolution" xRes := bin2l(substr( cValues, 1, 4 )) case nTag == 283 - cTag := 'YResolution' + cTag := "YResolution" yRes := bin2l(substr( cValues, 1, 4 )) case nTag == 284 - cTag := 'PlanarConfiguration' + cTag := "PlanarConfiguration" case nTag == 288 - cTag := 'FreeOffsets' + cTag := "FreeOffsets" case nTag == 289 - cTag := 'FreeByteCounts' + cTag := "FreeByteCounts" case nTag == 296 - cTag := 'ResolutionUnit' + cTag := "ResolutionUnit" nTemp := 0 IF nFieldType == SHORT nTemp := bin2w( cValues ) ENDIF case nTag == 305 - cTag := 'Software' + cTag := "Software" case nTag == 306 - cTag := 'DateTime' + cTag := "DateTime" case nTag == 315 - cTag := 'Artist' + cTag := "Artist" case nTag == 320 - cTag := 'ColorMap' + cTag := "ColorMap" case nTag == 338 - cTag := 'ExtraSamples' + cTag := "ExtraSamples" case nTag == 33432 - cTag := 'Copyright' + cTag := "Copyright" otherwise - cTag := 'Unknown' + cTag := "Unknown" endcase next fread( nHandle, @cIFDNext, 4 ) @@ -2367,7 +2367,7 @@ local cRun := cPathAcro + "\AcroRd32.exe /t " + cFile + " " + ; chr(34) + "HP LaserJet 5/5M PostScript" + chr(34) + " " + ; chr(34) + "LPT1" + chr(34) -IF ( ! RunExternal( cRun, 'print' ) ) +IF ( ! RunExternal( cRun, "print" ) ) alert( "Error printing to PDF reader." ) break ENDIF @@ -2385,7 +2385,7 @@ METHOD Execute( cFile ) local cPathAcro := "c:\progra~1\Adobe\Acroba~1.0\Reader" local cRun := cPathAcro + "\AcroRd32.exe /t " + cFile + " " + chr(34) + "HP LaserJet 5/5M PostScript" + chr(34) + " " + chr(34) + "LPT1" + chr(34) -IF (! RunExternal( cRun, 'open', cFile ) ) +IF (! RunExternal( cRun, "open", cFile ) ) alert("Error printing to PDF reader.") break ENDIF @@ -2540,7 +2540,7 @@ local cData := valtype(xData) elseif ISDATE( xData ) cData += i2bin( 8 )+dtos(xData) elseif ISLOGICAL(xData) - cData += i2bin( 1 )+if( xData,'T','F' ) + cData += i2bin( 1 )+if( xData,"T","F" ) elseif ISARRAY( xData ) cData += i2bin( len( xData ) ) else @@ -2563,7 +2563,7 @@ if hFile == NIL // First Timer endif cData := space( 3 ) fRead( hFile, @cData, 3 ) - if left( cData,1 ) != 'A' // If format of file != array + if !( left( cData,1 ) == "A" ) // If format of file != array fClose( hFile ) ////////// return( aRay ) endif @@ -2578,7 +2578,7 @@ do while nDepth < nLen endif cType := padl( cData,1 ) nDataLen := bin2i( right( cData,2 ) ) - if cType != 'A' + if !( cType == "A" ) cData := space( nDataLen ) nBytes:= fRead( hFile, @cData, nDataLen ) if nBytes < nDataLen @@ -2587,15 +2587,15 @@ do while nDepth < nLen endif nDepth++ aadd( aRay,NIL ) - if cType=='C' + if cType=="C" aRay[ nDepth ] := cData - elseif cType=='N' + elseif cType=="N" aRay[ nDepth ] := val(cData) - elseif cType=='D' + elseif cType=="D" aRay[ nDepth ] := ctod( left( cData, 4 ) + "/" + substr( cData, 5, 2 ) + "/" + substr( cData, 7, 2 )) //stod(cData) - elseif cType=='L' - aRay[ nDepth ] := ( cData=='T' ) - elseif cType=='A' + elseif cType=="L" + aRay[ nDepth ] := ( cData=="T" ) + elseif cType=="A" aRay[ nDepth ] := File2Array( , nDataLen, hFile ) endif enddo @@ -2624,7 +2624,7 @@ static function RunExternal( cCmd, cVerb, cFile ) local lRet := .t. #ifdef __CLP__ - lRet := SwpRunCmd( cCmd, 0, '', '' ) + lRet := SwpRunCmd( cCmd, 0, "", "" ) #endif #ifdef __HARBOUR__ diff --git a/harbour/contrib/hbw32/w32_ole.c b/harbour/contrib/hbw32/w32_ole.c index 642ff188b2..4c5a8165fc 100644 --- a/harbour/contrib/hbw32/w32_ole.c +++ b/harbour/contrib/hbw32/w32_ole.c @@ -77,7 +77,7 @@ #ifndef __MINGW32__ // Missing in Mingw V 2. - //#include + //#include #endif #include diff --git a/harbour/contrib/hbwhat32/_wininet.c b/harbour/contrib/hbwhat32/_wininet.c index 51e602b797..96e8d7aa19 100644 --- a/harbour/contrib/hbwhat32/_wininet.c +++ b/harbour/contrib/hbwhat32/_wininet.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include "hbapi.h" @@ -288,8 +288,8 @@ HB_FUNC( FTPCOMMAND ) ); */ // -// #include 'WinTypes.ch' -// #include 'cStruct.ch' +// #include "wintypes.ch" +// #include "cstruct.ch" // // // pragma pack(4) diff --git a/harbour/contrib/hbwhat32/whatutil.prg b/harbour/contrib/hbwhat32/whatutil.prg index c6ac28835d..a57141a72d 100644 --- a/harbour/contrib/hbwhat32/whatutil.prg +++ b/harbour/contrib/hbwhat32/whatutil.prg @@ -7,12 +7,12 @@ #include "common.ch" #include "winuser.ch" -#include "What32.ch" -#include 'debug.ch' -#include 'wingdi.ch' +#include "what32.ch" +#include "debug.ch" +#include "wingdi.ch" -#include 'wintypes.ch' -#include 'cstruct.ch' +#include "wintypes.ch" +#include "cstruct.ch" #define CTYPE_BOOL 5 @@ -96,7 +96,7 @@ Function Alert( cMsg, aChoices ) Endif EndIf - cTitle := 'Alert' + cTitle := "Alert" If aChoices == NIL aChoices := { "&Ok" } @@ -158,7 +158,7 @@ Function Alert( cMsg, aChoices ) aDlg := MakeDlgTemplate( cTitle, ; WS_CAPTION + DS_MODALFRAME + WS_VISIBLE + 4 + WS_POPUP + DS_SETFONT, ; - 0, 0, w, h, 8, 'MS Sans Serif' ) + 0, 0, w, h, 8, "MS Sans Serif" ) For i := 1 To n aDlg := AddDlgItem( aDlg, i, "BUTTON", ; @@ -244,8 +244,8 @@ Function WrapText(cText,nMaxSize,hFont) For i:=1 To Len(a) c:="" Do While UnMapDialogRect(a[i],hFont)[1] > nMaxSize - If (n:=rat(' ',a[i])) > 0 - c:=SubStr(a[i],n+1)+' '+c + If (n:=rat(" ",a[i])) > 0 + c:=SubStr(a[i],n+1)+" "+c a[i]:=Left(a[i],n-1) Else Exit @@ -267,7 +267,7 @@ Function UnMapDialogRect(cText,hfont) Local hDC := GetDC(0) Local hOldFont:=SelectObject(hDC,hFont) Local aTextExt:=GetTextExtentPoint32(hDC,; - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") Local arect:={0,0,100,100} @@ -392,7 +392,7 @@ Function str2a ( string, parser ) Local commapos := 0 If parser == NIL - parser := ',' + parser := "," EndIf Do While Len( string ) > 0 @@ -402,7 +402,7 @@ Function str2a ( string, parser ) string := SubStr( string, commapos + Len( parser ) ) Else aAdd( retar, string ) - string := '' + string := "" EndIf EndDo @@ -411,11 +411,11 @@ Function str2a ( string, parser ) *-----------------------------------------------------------------------------* FUNCTION a2str( a, parser ) - LOCAL retstr := '' + LOCAL retstr := "" LOCAL i IF parser == NIL - parser := ',' + parser := "," ENDIF FOR i := 1 TO Len( a ) @@ -708,33 +708,33 @@ Function Bin2Array( cBin, aTypes ) FUNCTION WinColors( nfg, nbg ) LOCAL acolors := { ; // valueas below are PROBABLY (!) correct. - { 'N' , RGB( 0, 0, 0 ) } , ; - { 'B' , RGB( 0, 0, 128 ) } , ; - { 'G' , RGB( 0, 128, 0 ) } , ; - { 'BG' , RGB( 0, 128, 128 ) } , ; - { 'GB' , RGB( 0, 128, 128 ) } , ; - { 'R' , RGB( 128, 0, 0 ) } , ; - { 'RB' , RGB( 128, 0, 128 ) } , ; - { 'BR' , RGB( 128, 0, 128 ) } , ; - { 'GR' , RGB( 128, 128, 0 ) } , ; - { 'RG' , RGB( 128, 128, 0 ) } , ; - { 'W' , RGB( 192, 192, 192 ) } , ; - { 'N+' , RGB( 128, 128, 128 ) } , ; - { 'B+' , RGB( 0, 0, 255 ) } , ; - { 'G+' , RGB( 0, 255, 0 ) } , ; - { 'BG+', RGB( 0, 255, 255 ) } , ; - { 'GB+', RGB( 0, 255, 255 ) } , ; - { 'R+' , RGB( 255, 0, 0 ) } , ; - { 'RB+', RGB( 255, 0, 255 ) } , ; - { 'BR+', RGB( 255, 0, 255 ) } , ; - { 'GR+', RGB( 255, 255, 0 ) } , ; - { 'RG+', RGB( 255, 255, 0 ) } , ; - { 'W+' , RGB( 255, 255, 255 ) } } + { "N" , RGB( 0, 0, 0 ) } , ; + { "B" , RGB( 0, 0, 128 ) } , ; + { "G" , RGB( 0, 128, 0 ) } , ; + { "BG" , RGB( 0, 128, 128 ) } , ; + { "GB" , RGB( 0, 128, 128 ) } , ; + { "R" , RGB( 128, 0, 0 ) } , ; + { "RB" , RGB( 128, 0, 128 ) } , ; + { "BR" , RGB( 128, 0, 128 ) } , ; + { "GR" , RGB( 128, 128, 0 ) } , ; + { "RG" , RGB( 128, 128, 0 ) } , ; + { "W" , RGB( 192, 192, 192 ) } , ; + { "N+" , RGB( 128, 128, 128 ) } , ; + { "B+" , RGB( 0, 0, 255 ) } , ; + { "G+" , RGB( 0, 255, 0 ) } , ; + { "BG+", RGB( 0, 255, 255 ) } , ; + { "GB+", RGB( 0, 255, 255 ) } , ; + { "R+" , RGB( 255, 0, 0 ) } , ; + { "RB+", RGB( 255, 0, 255 ) } , ; + { "BR+", RGB( 255, 0, 255 ) } , ; + { "GR+", RGB( 255, 255, 0 ) } , ; + { "RG+", RGB( 255, 255, 0 ) } , ; + { "W+" , RGB( 255, 255, 255 ) } } - LOCAL ccolor := Left( setcolor( ) , at( ',', setcolor( ) ) - 1 ) - LOCAL ishibg := ( '*' $ ccolor ) - LOCAL cfg := Upper(StrTran( Left( ccolor, at( '/', ccolor ) - 1 ) , '*', '' )) - LOCAL cbg := Upper(StrTran(SubStr( ccolor, at( '/', ccolor ) + 1 ),'*','')) + iif( ishibg, '+', '' ) + LOCAL ccolor := Left( setcolor( ) , at( ",", setcolor( ) ) - 1 ) + LOCAL ishibg := ( "*" $ ccolor ) + LOCAL cfg := Upper(StrTran( Left( ccolor, at( "/", ccolor ) - 1 ) , "*", "" )) + LOCAL cbg := Upper(StrTran(SubStr( ccolor, at( "/", ccolor ) + 1 ),"*","")) + iif( ishibg, "+", "" ) LOCAL npos := 0 nfg := RGB( 255, 255, 255 ) diff --git a/harbour/contrib/hbwhat32/wincdlg.prg b/harbour/contrib/hbwhat32/wincdlg.prg index 82a6f318ee..a513cc862b 100644 --- a/harbour/contrib/hbwhat32/wincdlg.prg +++ b/harbour/contrib/hbwhat32/wincdlg.prg @@ -4,13 +4,13 @@ // WHAT32 // Common Dialog interface -#Define WT_DIALOG 0 // used internally (user custom dialog class - advanced option) -#Include "commdlg.ch" -#Include "winuser.ch" +#define WT_DIALOG 0 // used internally (user custom dialog class - advanced option) +#include "commdlg.ch" +#include "winuser.ch" /* pragma(4) -#Include "ctruct.ch" -#Include "WinStruc.ch" +#include "ctruct.ch" +#include "winstruc.ch" */ // Under development !!! diff --git a/harbour/contrib/hbwhat32/wincomm.prg b/harbour/contrib/hbwhat32/wincomm.prg index bd347899d2..e692fd1d34 100644 --- a/harbour/contrib/hbwhat32/wincomm.prg +++ b/harbour/contrib/hbwhat32/wincomm.prg @@ -6,9 +6,9 @@ // common controls and common dialogs -#Include "winuser.ch" -#include 'commctrl.ch' -#include 'what32.ch' +#include "winuser.ch" +#include "commctrl.ch" +#include "what32.ch" *------------------------------------------------------------------------------ diff --git a/harbour/contrib/hbwhat32/wincore.prg b/harbour/contrib/hbwhat32/wincore.prg index d558d1918d..daf8c9f190 100644 --- a/harbour/contrib/hbwhat32/wincore.prg +++ b/harbour/contrib/hbwhat32/wincore.prg @@ -23,8 +23,8 @@ #include "common.ch" -#Include "winuser.ch" -#Include "hboo.ch" +#include "winuser.ch" +#include "hboo.ch" //PUBLIC lPrevInstance //PUBLIC hThisInstance @@ -42,7 +42,7 @@ Static aProc // array of possible windows procedures (10) INIT PROCEDURE _CheckMultiInst - lPrevInstance:=(empty(CreateMutex( , .T., strtran(GetModuleFileName(),'\','_') )) ; + lPrevInstance:=(empty(CreateMutex( , .T., strtran(GetModuleFileName(),"\","_") )) ; .or. (GetLastError() > 0) ) hThisInstance:=_getinstance() diff --git a/harbour/contrib/hbwhat32/winrbar.prg b/harbour/contrib/hbwhat32/winrbar.prg index 1c77f14eeb..c608eaed2e 100644 --- a/harbour/contrib/hbwhat32/winrbar.prg +++ b/harbour/contrib/hbwhat32/winrbar.prg @@ -7,20 +7,20 @@ #include "common.ch" -#Include "winuser.ch" +#include "winuser.ch" #include "hbclass.ch" -#Include "wintypes.ch" -#Include "cstruct.ch" +#include "wintypes.ch" +#include "cstruct.ch" pragma pack(4) -#Include "winstruc.ch" +#include "winstruc.ch" -#Include 'what32.ch' -#Include "commctrl.ch" +#include 'what32.ch' +#include "commctrl.ch" -#Include 'debug.ch' +#include 'debug.ch' typedef struct tagREBARINFO; {; diff --git a/harbour/contrib/hbwhat32/wintabs.prg b/harbour/contrib/hbwhat32/wintabs.prg index 54650040c0..329da4bea5 100644 --- a/harbour/contrib/hbwhat32/wintabs.prg +++ b/harbour/contrib/hbwhat32/wintabs.prg @@ -2,14 +2,14 @@ * $Id$ */ -#Define WIN_WANT_VER4 +#define WIN_WANT_VER4 #define WIN_WANT_ALL -#Include "winuser.ch" +#include "winuser.ch" #include "hbclass.ch" -//#Include 'debug.ch' -#Include "commctrl.ch" -#Include "wintypes.ch" -#Include "cstruct.ch" +//#include "debug.ch" +#include "commctrl.ch" +#include "wintypes.ch" +#include "cstruct.ch" #include "wingdi.ch" diff --git a/harbour/contrib/hbwhat32/wintbar.prg b/harbour/contrib/hbwhat32/wintbar.prg index 86f482cb16..0f49440af0 100644 --- a/harbour/contrib/hbwhat32/wintbar.prg +++ b/harbour/contrib/hbwhat32/wintbar.prg @@ -8,13 +8,13 @@ #include "common.ch" -#Include "winuser.ch" +#include "winuser.ch" #include "hbclass.ch" -#Include "commctrl.ch" -#Include 'debug.ch' -#Include "wintypes.ch" -#Include "cstruct.ch" -#Include 'what32.ch' +#include "commctrl.ch" +#include "debug.ch" +#include "wintypes.ch" +#include "cstruct.ch" +#include "what32.ch" pragma pack(4) diff --git a/harbour/contrib/rddads/tests/testmg.prg b/harbour/contrib/rddads/tests/testmg.prg index 6d64ecb2c7..6eedb66135 100644 --- a/harbour/contrib/rddads/tests/testmg.prg +++ b/harbour/contrib/rddads/tests/testmg.prg @@ -53,7 +53,7 @@ #include "ord.ch" #include "set.ch" -#include "Ads.ch" +#include "ads.ch" function Main() diff --git a/harbour/doc/es/compiler.txt b/harbour/doc/es/compiler.txt index f078c663c5..8b19e66c42 100644 --- a/harbour/doc/es/compiler.txt +++ b/harbour/doc/es/compiler.txt @@ -77,7 +77,7 @@ * /gp tipo de salida: fuente de Pascal (.pas) * /gr tipo de salida: recursos de Windows (.rc) * - * /i Agrega la ruta de búsqueda de archivos #Include + * /i Agrega la ruta de búsqueda de archivos #include * ---------------- * * /l Suprime la informaci¢n del número de L¡nea diff --git a/harbour/doc/es/file.txt b/harbour/doc/es/file.txt index 8ea7c02bc0..3ba09e62ff 100644 --- a/harbour/doc/es/file.txt +++ b/harbour/doc/es/file.txt @@ -351,9 +351,9 @@ * Note que esos valores podr¡an ser distintos en otra plataforma * (sistema operativo) distinta a DOS/Windows. * $EXAMPLES$ - * #include "Fileio.ch" + * #include "fileio.ch" * // - * nHandle := FCREATE("Temp.txt", FC_NORMAL) + * nHandle := FCREATE("temp.txt", FC_NORMAL) * * IF FERROR() != 0 * ? "No se puede crear el archivo, DOS error ", FERROR() @@ -639,8 +639,8 @@ * Nota: La utilizaci¢n de caracteres comodines '*' y '?' todav¡a no * est  soportada comletamente. * $EXAMPLES$ - * ? FILE( "c:\harbour\doc\compiler.txt") - * ? FILE( "c:\harbour\doc\subcodes.txt") + * ? FILE( "C:\harbour\doc\compiler.txt") + * ? FILE( "C:\harbour\doc\subcodes.txt") * * $STATUS$ * S (el soporte de comodines todav¡a est  ausente) @@ -964,7 +964,7 @@ * SET CONSOLE ON * * // Visualiza el archivo mitexto.dat en la pantalla y lo env¡a al - * // archivo MiReporte.txt + * // archivo mireporte.txt * TYPE mitexto.dat TO FILE MiReporte * * $STATUS$ diff --git a/harbour/tests/ainstest.prg b/harbour/tests/ainstest.prg index bb9f954da2..5b9f68e752 100644 --- a/harbour/tests/ainstest.prg +++ b/harbour/tests/ainstest.prg @@ -69,7 +69,7 @@ function aDump( aShow ) QQOut( "Len=", ALLTRIM( STR( len( aShow ) ) ) ) QQOut( ": " ) - for n=1 to len(aShow) + for n := 1 to len(aShow) QQOut( "[" ) QQOut( ALLTRIM (STR (n)) ) diff --git a/harbour/tests/codebloc.prg b/harbour/tests/codebloc.prg index 1d03a1e5ef..276a6bbe12 100644 --- a/harbour/tests/codebloc.prg +++ b/harbour/tests/codebloc.prg @@ -39,7 +39,7 @@ function Main() AnotherTest( a, "==> Another " ) OutStd( crlf ) - a ={|c| IIF( c=NIL, {|a| "First "+a}, {|a| "Second "+a}) } + a ={|c| IIF( c==NIL, {|a| "First "+a}, {|a| "Second "+a}) } a =EVAL( a ) OutStd( crlf ) OutStd( EVAL( a, "codeblock created in a codeblock" ) ) diff --git a/harbour/tests/keywords.prg b/harbour/tests/keywords.prg index 7707ae0fa0..ee23ee8fcd 100644 --- a/harbour/tests/keywords.prg +++ b/harbour/tests/keywords.prg @@ -212,7 +212,7 @@ begin sequence break->break :=break->break +break->break BREAK break :=break[ 2 ] //not allowed in Clipper - bReak :=IIF( bReak=1, BREAK(0), BREAK(bReak) ) + bReak :=IIF( bReak==1, BREAK(0), BREAK(bReak) ) recover USING bReak BREAK( Break( break(0) ) ) end diff --git a/harbour/tests/onidle.prg b/harbour/tests/onidle.prg index 232bdd2a1b..3726e601e3 100644 --- a/harbour/tests/onidle.prg +++ b/harbour/tests/onidle.prg @@ -23,7 +23,7 @@ LOCAL nPrev:=SECONDS() @ 12,2 SAY "Memory after collecting" + STR( MEMORY(HB_MEM_USED) ) nH1 := HB_IDLEADD( {|| DEVPOS(0,01), DEVOUT( TIME() ) } ) nH2 := HB_IDLEADD( {|| DEVPOS(0,21), TEST(), DEVOUT( MEMORY(HB_MEM_USED) ) } ) - nH3 := HB_IDLEADD( {|| DEVPOS(0,41), IIF(n=4,n:=1,n++),DEVOUT(aSign[n]) } ) + nH3 := HB_IDLEADD( {|| DEVPOS(0,41), IIF(n==4,n:=1,n++),DEVOUT(aSign[n]) } ) nH4 := HB_IDLEADD( {|| DEVPOS(0,61), DEVOUT( 1000*(SECONDS()-nPrev) ), nPrev:=SECONDS() } ) ? VALTYPE(nH1), nH1, VALTYPE(nH2), nH2, VALTYPE(nH3), nH3, VALTYPE(nH4), nH4 @@ -73,4 +73,3 @@ LOCAL cb EVAL( cb ) RETURN - diff --git a/harbour/tests/test_all.prg b/harbour/tests/test_all.prg index 08490ea824..35be6b1423 100644 --- a/harbour/tests/test_all.prg +++ b/harbour/tests/test_all.prg @@ -33,7 +33,7 @@ Function Main( cOption, cCmd ) fWrite(o,"if not .%1==. goto %1" + Chr(13) + Chr(10)) - FOR f=1 TO Len(aDir) + FOR f := 1 TO Len(aDir) IF TestIt(aDir[f][1]) p := At(".prg",Lower(aDir[f][1])) IF p > 1 @@ -53,15 +53,15 @@ RETURN NIL Function TestIt(cFile) LOCAL nH1,lRetu,nH2 - nH1=fOpen(cFile) - lRetu:=Upper(fReadStr(nH1,8))<>"//NOTEST" + nH1 := fOpen(cFile) + lRetu := Upper(fReadStr(nH1,8))<>"//NOTEST" fClose(nH1) IF !lRetu IF !File("NotTestd.txt") - nH2=fCreate("nottestd.txt") + nH2 := fCreate("nottestd.txt") ELSE - nH2=fOpen("nottestd.txt", FO_WRITE) + nH2 := fOpen("nottestd.txt", FO_WRITE) ENDIF fSeek(nH2, 0, FS_END) fWrite(nH2,DtoC(Date())+" "+Time()+" "+cFile+Chr(13)+Chr(10)) diff --git a/harbour/tests/wvtext.prg b/harbour/tests/wvtext.prg index 741b5adc02..69f0f0dae7 100644 --- a/harbour/tests/wvtext.prg +++ b/harbour/tests/wvtext.prg @@ -14,10 +14,10 @@ //----------------------------------------------------------------------// //----------------------------------------------------------------------// -#include 'hbgtinfo.ch' -#include 'inkey.ch' +#include "hbgtinfo.ch" +#include "inkey.ch" #ifdef __GTWVG__ -#include 'hbgtwvg.ch' +#include "hbgtwvg.ch" #endif #define RGB(r,g,b) ( r + ( g * 256 ) + ( b * 256 * 256 ) ) @@ -34,10 +34,10 @@ FUNCTION Main() Hb_GtInfo( HB_GTI_FONTWIDTH, nWidth ) Hb_GtInfo( HB_GTI_FONTSIZE , nHeight ) #ifdef __GTWVG__ - Hb_GtInfo( HB_GTI_ICONFILE, 'C:\Harbour\Contrib\Gtwvg\Tests\Vr_1.ico' ) + Hb_GtInfo( HB_GTI_ICONFILE, "..\contrib\gtwvg\tests\vr_1.ico" ) #endif SetCursor( 0 ) - SetColor( 'n/w' ) + SetColor( "n/w" ) HB_GtInfo( HB_GTI_NOTIFIERBLOCK, {|nEvent, ...| MyNotifier( nEvent, ... ) } ) @@ -51,7 +51,7 @@ FUNCTION Main() DO CASE CASE nKey == K_ENTER - Alert( ' Pressed' ) + Alert( " Pressed" ) CASE nKey == K_F2 lMark := Hb_GtInfo( HB_GTI_SELECTCOPY ) @@ -92,11 +92,11 @@ STATIC FUNCTION MyNotifier( nEvent, ... ) CASE nEvent == HB_GTE_SETFOCUS DispScreen() - DispOutAt( maxrow(), 33, "We got focus", 'B/G*' ) + DispOutAt( maxrow(), 33, "We got focus", "B/G*" ) CASE nEvent == HB_GTE_CLOSE DispScreen() - if Alert( 'Close Application', {'Yes','No' } ) == 2 + if Alert( "Close Application", {"Yes","No" } ) == 2 Return ( 1 ) endif @@ -108,32 +108,32 @@ STATIC FUNCTION MyNotifier( nEvent, ... ) STATIC FUNCTION DispScreen() Local nRow := 12, nCol := 28 - Local cColor := 'N/W' + Local cColor := "N/W" Local nMaxCol := MaxCol()+1 DispBegin() CLS - DispOutAt( 0, 0,padc( 'Harbour GT - New Features', maxcol()+1 ), 'N/GR*' ) + DispOutAt( 0, 0,padc( "Harbour GT - New Features", maxcol()+1 ), "N/GR*" ) // Contributed by Massimo Belgrano - DispOutAt( 2, 0, padc( "______ __ ______________________ ",nMaxCol ), 'W+/W' ) - DispOutAt( 3, 0, padc( "___ / / /_____ ___________ /___________ _________ __ ____/____/",nMaxCol ), 'W+/W' ) - DispOutAt( 4, 0, padc( "__ /_/ /_ __ `/_ ___/_ __ \ __ \ / / /_ ___/ _ / __ __/ ",nMaxCol ), 'W+/W' ) - DispOutAt( 5, 0, padc( "_ __ / / /_/ /_ / _ /_/ / /_/ / /_/ /_ / / /_/ / _ / ",nMaxCol ), 'W+/W' ) - DispOutAt( 6, 0, padc( "/_/ /_/ \__,_/ /_/ /_.___/\____/\__,_/ /_/ \____/ /_/ ",nMaxCol ), 'W+/W' ) + DispOutAt( 2, 0, padc( "______ __ ______________________ ",nMaxCol ), "W+/W" ) + DispOutAt( 3, 0, padc( "___ / / /_____ ___________ /___________ _________ __ ____/____/",nMaxCol ), "W+/W" ) + DispOutAt( 4, 0, padc( "__ /_/ /_ __ `/_ ___/_ __ \ __ \ / / /_ ___/ _ / __ __/ ",nMaxCol ), "W+/W" ) + DispOutAt( 5, 0, padc( "_ __ / / /_/ /_ / _ /_/ / /_/ / /_/ /_ / / /_/ / _ / ",nMaxCol ), "W+/W" ) + DispOutAt( 6, 0, padc( "/_/ /_/ \__,_/ /_/ /_.___/\____/\__,_/ /_/ \____/ /_/ ",nMaxCol ), "W+/W" ) - DispOutAt( ++nRow, nCol, '< F2 MarkCopy Toggle >', cColor ) - DispOutAt( ++nRow, nCol, '< F3 Resize Toggle >', cColor ) - DispOutAt( ++nRow, nCol, '< F4 Closable Toggle >', cColor ) - DispOutAt( ++nRow, nCol, '< F5 Palette L Repeat >', cColor ) - DispOutAt( ++nRow, nCol, '< F6 Palette D Repeat >', cColor ) - DispOutAt( ++nRow, nCol, '< F7 Palette By Index R >', cColor ) - DispOutAt( ++nRow, nCol, '< F8 MarkCopy menu text >', cColor ) - DispOutAt( ++nRow, nCol, '< Click Other Window >', cColor ) - DispOutAt( ++nRow, nCol, '< Click X Button >', cColor ) + DispOutAt( ++nRow, nCol, "< F2 MarkCopy Toggle >", cColor ) + DispOutAt( ++nRow, nCol, "< F3 Resize Toggle >", cColor ) + DispOutAt( ++nRow, nCol, "< F4 Closable Toggle >", cColor ) + DispOutAt( ++nRow, nCol, "< F5 Palette L Repeat >", cColor ) + DispOutAt( ++nRow, nCol, "< F6 Palette D Repeat >", cColor ) + DispOutAt( ++nRow, nCol, "< F7 Palette By Index R >", cColor ) + DispOutAt( ++nRow, nCol, "< F8 MarkCopy menu text >", cColor ) + DispOutAt( ++nRow, nCol, "< Click Other Window >", cColor ) + DispOutAt( ++nRow, nCol, "< Click X Button >", cColor ) #ifdef __GTWVG__ - DispOutAt( ++nRow, nCol, '< F9 Run in SysTray >', cColor ) + DispOutAt( ++nRow, nCol, "< F9 Run in SysTray >", cColor ) #endif DispOutAt( maxrow(), 0, Space( maxcol()+1 ), "N/G*" ) @@ -178,7 +178,7 @@ FUNCTION SetPalette( nMode ) nG += if( nMode == 0, -5, 5 ) nB += if( nMode == 0, -5, 5 ) - // Change 'W' to slightly gray everytime you press F5 + // Change "W" to slightly gray everytime you press F5 // aPalette[ 8 ] := RGB( nR, nG, nB ) @@ -203,12 +203,12 @@ FUNCTION SetPaletteIndex() FUNCTION RunInSysTray() #ifdef __GTWVG__ - Alert( 'Please check your System Tray area after exiting this alert,'+; - ';then right click on the icon'+; - ';displaying tooltip "Harbour GT in SysTray" !' ) + Alert( "Please check your System Tray area after exiting this alert,"+; + ";then right click on the icon"+; + ";displaying tooltip "Harbour GT in SysTray" !" ) Hb_GtInfo( HB_GTI_SPEC, HB_GTS_SYSTRAYICON, { NIM_ADD, NIT_FILE, ; - 'C:\Harbour\Contrib\Gtwvg\Tests\Vr_1.ico', 'Harbour GT in SysTray' } ) + "..\contrib\gtwvg\tests\vr_1.ico", "Harbour GT in SysTray" } ) #endif RETURN NIL diff --git a/harbour/utils/hbmake/hbmake.prg b/harbour/utils/hbmake/hbmake.prg index 4f01c3e675..9d37cd7e45 100644 --- a/harbour/utils/hbmake/hbmake.prg +++ b/harbour/utils/hbmake/hbmake.prg @@ -3273,7 +3273,7 @@ RETURN NIL *------------------------------------------------------------ FUNCTION ScanInclude( cFile, lRecursive, cExclExtent, aFiles) *------------------------------------------------------------ -// Search for #Include & Set Procedure To & Set Proc To +// Search for #include & Set Procedure To & Set Proc To LOCAL cFileList := "" LOCAL nHandle := -1 @@ -3339,7 +3339,7 @@ FUNCTION ScanInclude( cFile, lRecursive, cExclExtent, aFiles) ENDDO ENDIF // Dependencies - IF Upper(Left( cTemp ,8)) == "#INCLUDE" + IF Lower(Left( cTemp ,8)) == "#include" cTemp := AllTrim(SubStr( cTemp, 9)) Else IF lPrg .and. Upper(Left( cTemp, 16)) == "SET PROCEDURE TO"