diff --git a/src/Runtime/XSharp.VFP.Tests/MiscTests.prg b/src/Runtime/XSharp.VFP.Tests/MiscTests.prg index b1e701b209..b83d0f05c5 100644 --- a/src/Runtime/XSharp.VFP.Tests/MiscTests.prg +++ b/src/Runtime/XSharp.VFP.Tests/MiscTests.prg @@ -344,6 +344,15 @@ BEGIN NAMESPACE XSharp.VFP.Tests Assert.Equal(0, ImeStatus(1)) END METHOD + [Fact, Trait("Category", "Printer")]; + METHOD PRowTest() AS VOID + Assert.Equal(0, PRow()) + END METHOD + + [Fact, Trait("Category", "Printer")]; + METHOD PColTest() AS VOID + Assert.Equal(0, PCol()) + END METHOD END CLASS END NAMESPACE diff --git a/src/Runtime/XSharp.VFP/PrinterFunctions.prg b/src/Runtime/XSharp.VFP/PrinterFunctions.prg index 29b94f1bb7..7bc64c1e3b 100644 --- a/src/Runtime/XSharp.VFP/PrinterFunctions.prg +++ b/src/Runtime/XSharp.VFP/PrinterFunctions.prg @@ -7,6 +7,11 @@ USING System USING XSharp.VFP USING XSharp.Internal +/// Internal printer row position. Reset by EJECT. +GLOBAL __FoxPrinterRow := 0 AS LONG +/// Internal printer column position. Reset by EJECT. +GLOBAL __FoxPrinterCol := 0 AS LONG + /// [FoxArrayInputParameter(1)]; [FoxProFunction("APRINTERS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; @@ -38,3 +43,13 @@ FUNCTION APrinters( ArrayName AS USUAL, nValue := 0 AS INT ) AS INT RETURN (INT)nRows ENDFUNC + +/// +[FoxProFunction("PCOL", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; +FUNCTION PCol() AS LONG + RETURN __FoxPrinterRow + +/// +[FoxProFunction("PROW", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; +FUNCTION PRow() AS LONG + RETURN __FoxPrinterCol diff --git a/src/Runtime/XSharp.VFP/ToDo-NOP.prg b/src/Runtime/XSharp.VFP/ToDo-NOP.prg index e2547bc288..7aa7cc7106 100644 --- a/src/Runtime/XSharp.VFP/ToDo-NOP.prg +++ b/src/Runtime/XSharp.VFP/ToDo-NOP.prg @@ -21,13 +21,6 @@ FUNCTION OldVal( cExpression , uArea ) AS USUAL THROW NotImplementedException{} // RETURN NIL -/// -- todo -- -/// -[FoxProFunction("PCOL", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; -FUNCTION PCol( ) AS LONG - THROW NotImplementedException{} - // RETURN 0 - /// -- todo -- /// // Note needs Database Container support @@ -36,13 +29,6 @@ FUNCTION Primary( nIndexNumber, uArea) AS LOGIC THROW NotImplementedException{} // RETURN FALSE -/// -- todo -- -/// -[FoxProFunction("PROW", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; -FUNCTION PRow( ) AS LONG - THROW NotImplementedException{} - // RETURN 0 - /// -- todo -- /// [FoxProFunction("PRTINFO", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; diff --git a/src/Runtime/XSharp.VFP/functionsToImplement.txt b/src/Runtime/XSharp.VFP/functionsToImplement.txt index 01575d315d..f59b0329a0 100644 --- a/src/Runtime/XSharp.VFP/functionsToImplement.txt +++ b/src/Runtime/XSharp.VFP/functionsToImplement.txt @@ -84,9 +84,7 @@ LOOKUP( ) MAKETRANSACTABLE( ) NEWOBJECT( ) OLDVAL( ) -PCOL( ) PRIMARY( ) -PROW( ) PRTINFO( ) PUTFILE( ) RAISEEVENT( )