diff --git a/src/Runtime/XSharp.VFP/ArrayFunctions.prg b/src/Runtime/XSharp.VFP/ArrayFunctions.prg index 7f26b243ed..7c6edc1e2c 100644 --- a/src/Runtime/XSharp.VFP/ArrayFunctions.prg +++ b/src/Runtime/XSharp.VFP/ArrayFunctions.prg @@ -20,6 +20,7 @@ INTERNAL FUNCTION FoxALen(a as ARRAY) AS DWORD RETURN XSharp.VFP.Functions.ALen( (__FoxArray) a, 0) /// +[FoxProFunction("ALEN", FoxFunctionCategory.Array, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION ALen(a AS __FoxArray) AS DWORD RETURN XSharp.VFP.Functions.ALen(a, 0) @@ -47,6 +48,7 @@ FUNCTION __FoxALen(a AS __FoxArray) AS DWORD RETURN XSharp.VFP.Functions.ALen(a, 0) /// +[FoxProFunction("AELEMENT", FoxFunctionCategory.Array, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION AElement(ArrayName AS __FoxArray, nRowSubscript AS DWORD) AS USUAL IF ( nRowSubscript > 0 .AND. nRowSubscript <= ArrayName:Rows ) RETURN nRowSubscript @@ -82,8 +84,8 @@ FUNCTION __FoxADel(foxArray AS __FoxArray, nElementNumber AS LONG, nDeleteType : ENDIF RETURN 1 - /// +[FoxProFunction("ADEL", FoxFunctionCategory.Array, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION ADel(foxArray AS __FoxArray, nElementNumber AS LONG, nDeleteType := 2 AS LONG) AS DWORD RETURN __FoxADel(foxArray, nElementNumber, nDeleteType) @@ -99,6 +101,7 @@ FUNCTION ADel(ArrayName AS ARRAY, nElementNumber AS LONG, nDeleteType AS LONG) A /// +[FoxProFunction("ASUBSCRIPT", FoxFunctionCategory.Array, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION ASubScript(ArrayName AS __FoxArray, nElementNumber AS DWORD, nSubscript := 1 AS DWORD) AS DWORD IF nSubscript == 0 .OR. nSubscript > 2 var cMessage := __VfpStr(VFPErrors.VFP_ATTRIBUTE_OUT_OF_RANGE, nameof(nSubscript)) @@ -165,10 +168,10 @@ FUNCTION __FoxAIns(foxArray AS __FoxArray, nElementNumber AS DWORD, nInsertType RETURN 1 /// +[FoxProFunction("AINS", FoxFunctionCategory.Array, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION AIns(ArrayName AS __FoxArray, nElementNumber AS DWORD, nInsertType := 1 AS DWORD) AS DWORD RETURN __FoxAIns(ArrayName, nElementNumber, nInsertType) - INTERNAL FUNCTION FoxAIns(ArrayName AS ARRAY, nElementNumber AS DWORD, nInsertType AS DWORD) AS DWORD IF ArrayName IS __FoxArray VAR foxArray RETURN __FoxAIns(foxArray, nElementNumber, nInsertType) @@ -176,8 +179,6 @@ INTERNAL FUNCTION FoxAIns(ArrayName AS ARRAY, nElementNumber AS DWORD, nInsertTy XSharp.RT.Functions.AIns(ArrayName, nElementNumber) RETURN 1 - - /// /// The parameter to this function is a 'General Array'. The function decides at runtime if the array is a FoxPro array or a 'General' Array FUNCTION AIns(ArrayName AS ARRAY, nElementNumber AS DWORD, nInsertType AS DWORD) AS DWORD @@ -243,6 +244,7 @@ RETURN END FUNCTION /// +[FoxProFunction("ALINES", FoxFunctionCategory.Array, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION ALines (ArrayName AS ARRAY, cExpression AS STRING, nFlags := 0 AS INT, cParseChars PARAMS STRING[]) AS DWORD IF cExpression == null cExpression := "" @@ -333,6 +335,7 @@ FUNCTION ALines (ArrayName AS ARRAY, cExpression AS STRING, nFlags := 0 AS INT, END FUNCTION /// +[FoxProFunction("AMEMBERS", FoxFunctionCategory.Array, FoxEngine.LanguageCore, FoxFunctionStatus.Partial, FoxCriticality.High)]; FUNCTION AMembers (ArrayName AS ARRAY, oObjectOrClass AS USUAL, nArrayContentsID := 0 AS INT, cFlags := "" AS STRING) AS DWORD LOCAL oType AS Type @@ -429,6 +432,7 @@ FUNCTION AMembers (ArrayName AS ARRAY, oObjectOrClass AS USUAL, nArrayContentsID END FUNCTION /// +[FoxProFunction("AGETFILEVERSION", FoxFunctionCategory.Array, FoxEngine.RuntimeCore, FoxFunctionStatus.Partial, FoxCriticality.Medium)]; FUNCTION AGetFileVersion (ArrayName AS ARRAY, cFileName AS STRING) AS DWORD IF String.IsNullOrEmpty(cFileName) .OR. !File.Exists(cFileName) RETURN 0 @@ -470,6 +474,7 @@ FUNCTION AGetFileVersion (ArrayName AS ARRAY, cFileName AS STRING) AS DWORD END FUNCTION /// +[FoxProFunction("AUSED", FoxFunctionCategory.Array, FoxEngine.WorkArea, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION AUsed (ArrayName AS ARRAY, nDataSessionNumber := NIL AS USUAL, cTableName := NIL AS USUAL) AS DWORD VAR oWA := RuntimeState.Workareas diff --git a/src/Runtime/XSharp.VFP/BitFunctions.prg b/src/Runtime/XSharp.VFP/BitFunctions.prg index e5e98c0b8c..98077ebf17 100644 --- a/src/Runtime/XSharp.VFP/BitFunctions.prg +++ b/src/Runtime/XSharp.VFP/BitFunctions.prg @@ -12,13 +12,16 @@ #define TYPE_ERROR2 "Value must be LONG" /// +[FoxProFunction("BITAND", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION BitAnd (Arg1 AS USUAL, Arg2 PARAMS USUAL[]) AS USUAL RETURN BitHelpers._BITANDORX(BitOperation.And, Arg1, Arg2) END FUNC + /// FUNCTION BitAnd (Arg1 AS INT, Arg2 PARAMS INT[]) AS INT RETURN BitHelpers._BITANDORX(BitOperation.And, Arg1, Arg2) END FUNC + /// FUNCTION BitAnd(Arg1 AS BINARY, Arg2 PARAMS BINARY[]) AS BINARY RETURN BitHelpers._BITANDORX(BitOperation.And, Arg1, Arg2) @@ -26,6 +29,7 @@ END FUNC /// +[FoxProFunction("BITCLEAR", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION BitClear (Arg1 AS USUAL) AS BINARY RETURN BitClear((BINARY)Arg1) END FUNC @@ -48,9 +52,7 @@ END FUNC /// FUNCTION BitClear (Arg1 AS USUAL, Arg2 AS USUAL, Arg3 AS USUAL) AS BINARY - RETURN BitClear((BINARY)Arg1, (INT)Arg2, (INT)Arg3) - END FUNC /// @@ -101,6 +103,7 @@ FUNCTION BitClear (BinString AS BINARY, StartBit AS INT, BitCount AS INT) AS BIN END FUNC /// +[FoxProFunction("BITLSHIFT", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION BitLShift (Arg AS INT, Bits AS INT) AS INT IF BETWEEN(Bits, 0, 31) RETURN Arg << Bits @@ -109,14 +112,14 @@ FUNCTION BitLShift (Arg AS INT, Bits AS INT) AS INT ENDIF END FUNC + /// FUNCTION BitLShift (Arg AS USUAL, Bits AS USUAL) AS INT RETURN BitLShift((INT)Arg, (INT)Bits) END FUNC - - /// +[FoxProFunction("BITNOT", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION BitNot (Arg1 AS USUAL) AS USUAL IF IsBinary(Arg1) RETURN BitNot((BINARY)Arg1) @@ -160,6 +163,7 @@ END FUNC /// +[FoxProFunction("BITOR", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION BitOr (Arg1 AS USUAL, Arg2 PARAMS USUAL[]) AS USUAL RETURN BitHelpers._BITANDORX(BitOperation.Or, Arg1, Arg2) END FUNC @@ -174,11 +178,8 @@ FUNCTION BitOr (Arg1 AS BINARY, Arg2 PARAMS BINARY[]) AS BINARY RETURN BitHelpers._BITANDORX(BitOperation.Or, Arg1, Arg2) END FUNC - - - - /// +[FoxProFunction("BITRSHIFT", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION BitRShift (Arg AS USUAL, Bits AS USUAL) AS INT IF IsNumeric(Arg) .AND. IsNumeric(Bits) RETURN BitRShift((INT)Arg, (INT)Bits) @@ -190,7 +191,6 @@ FUNCTION BitRShift (Arg AS USUAL, Bits AS USUAL) AS INT END FUNC - /// INTERNAL FUNCTION BitRShift (Arg AS INT, Bits AS INT) AS INT IF BETWEEN(Bits, 0, 31) @@ -205,8 +205,8 @@ INTERNAL FUNCTION BitRShift (Arg AS INT, Bits AS INT) AS INT END FUNC - /// +[FoxProFunction("BITSET", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION BitSet (Arg1 AS USUAL) AS BINARY RETURN BitSet((BINARY)Arg1) END FUNC @@ -239,16 +239,12 @@ END FUNC /// FUNCTION BitSet (BinString AS BINARY) AS BINARY - RETURN IIF(BinString.Length == 0, 0h, BitSet(BinString, 0, BinString.Length * 8)) - END FUNC /// FUNCTION BitSet (BinString AS BINARY, StartBit AS INT) AS BINARY - RETURN IIF(BinString.Length == 0, 0h, BitSet(BinString, StartBit, 1)) - END FUNC /// @@ -272,10 +268,10 @@ FUNCTION BitSet (BinString AS BINARY, StartBit AS INT, BitCount AS INT) AS BINAR NEXT RETURN (BINARY)Result - END FUNC /// +[FoxProFunction("BITTEST", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION BitTest (Arg AS USUAL, Bit AS USUAL) AS LOGIC IF IsBinary(Arg) RETURN BitTest((BINARY)Arg, (INT)Bit) @@ -317,6 +313,7 @@ FUNCTION BitXor (Arg1 AS USUAL, Arg2 PARAMS USUAL[]) AS USUAL END FUNC /// +[FoxProFunction("BITXOR", FoxFunctionCategory.Bitwise, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION BitXor (Arg1 AS INT, Arg2 PARAMS INT[]) AS INT RETURN BitHelpers._BITANDORX(BitOperation.Xor, Arg1, Arg2) END FUNC diff --git a/src/Runtime/XSharp.VFP/ClassFunctions.prg b/src/Runtime/XSharp.VFP/ClassFunctions.prg index a9debfbd59..69c4e0bf6c 100644 --- a/src/Runtime/XSharp.VFP/ClassFunctions.prg +++ b/src/Runtime/XSharp.VFP/ClassFunctions.prg @@ -5,6 +5,7 @@ // /// +[FoxProFunction("ADDPROPERTY", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION AddProperty (oObjectName AS OBJECT, cPropertyName AS STRING, eNewValue := NIL AS USUAL) AS LOGIC if (object) oObjectName is XSharp.IDynamicProperties2 var oDynamic oDynamic:_AddProperty(cPropertyName, eNewValue,1,"") @@ -15,6 +16,7 @@ FUNCTION AddProperty (oObjectName AS OBJECT, cPropertyName AS STRING, eNewValue /// +[FoxProFunction("REMOVEPROPERTY", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; function RemoveProperty( oObjectName as object, cPropertyName as string) as logic if (object) oObjectName is XSharp.IDynamicProperties2 var oDynamic oDynamic:_RemoveProperty(cPropertyName) @@ -25,6 +27,7 @@ function RemoveProperty( oObjectName as object, cPropertyName as string) as logi /// +[FoxProFunction("GETPEM", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION GETPEM( uObject as USUAL, cProperty as STRING) as USUAL if uObject is string var strObject return NIL diff --git a/src/Runtime/XSharp.VFP/DateFunctions.prg b/src/Runtime/XSharp.VFP/DateFunctions.prg index 5afd192996..7666f8a461 100644 --- a/src/Runtime/XSharp.VFP/DateFunctions.prg +++ b/src/Runtime/XSharp.VFP/DateFunctions.prg @@ -7,26 +7,32 @@ USING System.Globalization USING System.Collections.Generic /// +[FoxProFunction("DTOT", FoxFunctionCategory.DateAndTime, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION DToT( dDateExpression AS DATE) AS DateTime RETURN (System.DateTime) dDateExpression /// +[FoxProFunction("HOUR", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION Hour( tExpression AS System.DateTime) AS LONG RETURN tExpression:Hour /// +[FoxProFunction("MINUTE", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION Minute(tExpression AS System.DateTime) AS LONG RETURN tExpression:Minute /// +[FoxProFunction("SEC", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION Sec( tExpression AS System.DateTime) AS LONG RETURN tExpression:Second /// +[FoxProFunction("TTOD", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION TToD( tExpression AS System.DateTime) AS DATE RETURN (DATE) tExpression /// +[FoxProFunction("GOMONTH", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION GoMonth( dExpression AS DATE , iNumberOfMonths AS INT ) AS DATE RETURN GoMonth ( (System.DateTime) dExpression , iNumberOfMonths ) @@ -75,6 +81,7 @@ FUNCTION GoMonth( uExpression AS USUAL , iNumberOfMonths AS INT ) AS DATE /// +[FoxProFunction("QUARTER", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION Quarter( uExpression AS USUAL , nMonth := 1 AS INT ) AS INT IF IsDate(uExpression) RETURN Quarter ( (DATE) uExpression , nMonth ) @@ -104,6 +111,7 @@ FUNCTION Quarter( tExpression AS System.DateTime , nMonth := 1 AS INT ) AS INT RETURN (INT) System.Math.Ceiling((DECIMAL)dtOffset:Month / 3) /// +[FoxProFunction("WEEK", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION Week( uExpression AS USUAL, nFirstWeek := 1 AS LONG, nFirstDayOfWeek := 1 AS LONG) AS LONG IF IsDate(uExpression) RETURN Week ( (Date) uExpression , nFirstWeek, nFirstDayOfWeek ) @@ -148,6 +156,7 @@ FUNCTION Week( tExpression AS System.DateTime, nFirstWeek := 1 AS LONG, nFirstDa /// +[FoxProFunction("MDY", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION MDY ( uExpression AS USUAL ) AS STRING IF IsDate(uExpression) RETURN MDY( (DATE) uExpression ) @@ -194,7 +203,9 @@ FUNCTION DMY ( dExpression AS DATE ) AS STRING RETURN PadL(Day(dExpression), 2 , "0" ) + " " + CMonth(dExpression) + " " + ; IIF ( SetCentury() , dExpression:ToString("yyyy") , dExpression:ToString("yy") ) + /// +[FoxProFunction("CTOT", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION CToT(cCharacterExpression AS STRING) AS System.DateTime IF String.IsNullOrEmpty(cCharacterExpression) RETURN DateTime.MinValue @@ -215,6 +226,7 @@ FUNCTION CToT(cCharacterExpression AS STRING) AS System.DateTime ENDFUNC /// +[FoxProFunction("TTOC", FoxFunctionCategory.DateAndTime, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION TToC(tdExpression AS System.DateTime, nParam := 0 AS LONG) AS STRING LOCAL lcResult AS STRING LOCAL culture := CultureInfo.InvariantCulture AS CultureInfo @@ -383,23 +395,6 @@ INTERNAL STATIC CLASS DateTimeHelper RETURN aFormats:ToArray() END METHOD - // STATIC METHOD GetDateSeparatorForFormat(tcDateFormat AS STRING) AS STRING - // SWITCH tcDateFormat:ToUpper() - //ANSI, GERMAN - // CASE "YY.MM.DD" - // CASE "YYYY.MM.DD" - // CASE "DD.MM.YY" - // CASE "DD.MM.YYYY" - // RETURN "." - //ITALIAN - // CASE "DD-MM-YY" - // CASE "DD-MM-YYYY" - // RETURN "-" - // OTHERWISE - // RETURN "/" - // END SWITCH - // END METHOD - STATIC METHOD GetDateFormatsForParsing(tcDateFormat AS STRING, tcSeparator AS STRING, tlCentury AS LOGIC) AS STRING[] LOCAL aFormats := List{} AS List @@ -517,7 +512,6 @@ INTERNAL STATIC CLASS DateTimeHelper ENDIF ENDIF - // return i"{lcDatePart} {lcTimePart}" RETURN lcDatePart + " " + lcTimePart END METHOD @@ -549,7 +543,6 @@ INTERNAL STATIC CLASS DateTimeHelper LOCAL lcDatePart := GetEmptyDatePart(lcDateFormat, lCentury) AS STRING LOCAL lcTimePart := GetEmptyTimePart(lHours, lSeconds) AS STRING - // return i"{lcDatePart} {lcTimePart}" RETURN lcDatePart + " " + lcTimePart END METHOD diff --git a/src/Runtime/XSharp.VFP/FileFunctions.prg b/src/Runtime/XSharp.VFP/FileFunctions.prg index 113775e57d..0e716f43e8 100644 --- a/src/Runtime/XSharp.VFP/FileFunctions.prg +++ b/src/Runtime/XSharp.VFP/FileFunctions.prg @@ -17,6 +17,7 @@ DEFINE S2F_FLAG_UNICODE_FORMATS = S2F_FLAG_UNICODE_LE | S2F_FLAG_UTF8 | S2F_ DEFINE S2F_FLAG_UNICODE_TEXT = 0x0100 /// +[FoxProFunction("MKDIR", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION MkDir(cPath AS STRING) AS INT LOCAL nRet AS INT IF System.IO.Directory.Exists(cPath) @@ -31,8 +32,8 @@ FUNCTION MkDir(cPath AS STRING) AS INT END IF RETURN nRet - /// +[FoxProFunction("STRTOFILE", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION StrToFile (cExpression AS STRING, cFileName AS STRING) AS INT RETURN StrToFile(cExpression, cFileName, S2F_FLAG_OVERWRITE) @@ -193,6 +194,7 @@ FUNCTION StrToFile (cExpression AS STRING, cFileName AS STRING, nFlags AS INT) A END FUNCTION /// +[FoxProFunction("FILETOSTR", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION FileToStr (cFileName AS STRING) AS STRING RETURN FileToStr(cFileName, 0) @@ -250,6 +252,7 @@ FUNCTION FileToStr (cFileName AS STRING, Flags AS INT) AS STRING END FUNCTION /// +[FoxProFunction("DEFAULTEXT", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION DefaultExt( cFileName AS STRING, cDefault AS STRING) AS STRING var ext := Path.GetExtension(cFileName) if ext == "" .and. ! cFileName:EndsWith(".") @@ -259,11 +262,13 @@ FUNCTION DefaultExt( cFileName AS STRING, cDefault AS STRING) AS STRING /// +[FoxProFunction("DRIVETYPE", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION DriveType( cDrive as string) as DWORD RETURN Win32.GetDriveType(cDrive) /// +[FoxProFunction("FULLPATH", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION FullPath( cFileName1 as string, cFileName2 := "" as STRING) AS STRING IF File(cFileName1) RETURN FPathName() diff --git a/src/Runtime/XSharp.VFP/FinancialFunctions.prg b/src/Runtime/XSharp.VFP/FinancialFunctions.prg index d464d50f52..4c3e22eda3 100644 --- a/src/Runtime/XSharp.VFP/FinancialFunctions.prg +++ b/src/Runtime/XSharp.VFP/FinancialFunctions.prg @@ -5,6 +5,7 @@ // /// +[FoxProFunction("PAYMENT", FoxFunctionCategory.Financial, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION Payment( nPrincipal AS FLOAT , nInterestRate AS FLOAT , nPayments AS FLOAT ) AS FLOAT // ensures that both values are always positive @@ -17,6 +18,7 @@ FUNCTION Payment( nPrincipal AS FLOAT , nInterestRate AS FLOAT , nPayments AS FL RETURN nPrincipal * (nInterestRate * ( (1 + nInterestRate)^nPayments) ) / (((1+ nInterestRate)^nPayments) - 1) /// +[FoxProFunction("PV", FoxFunctionCategory.Financial, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION PV ( nPayment AS FLOAT , nInterestRate AS FLOAT , nTotalPayments AS FLOAT ) AS FLOAT // ensures that both values are always positive @@ -29,6 +31,7 @@ FUNCTION PV ( nPayment AS FLOAT , nInterestRate AS FLOAT , nTotalPayments AS FLO RETURN nPayment * (1 - (1 + nInterestRate)^-nTotalPayments)/nInterestRate /// +[FoxProFunction("FV", FoxFunctionCategory.Financial, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION FV ( nPayment AS FLOAT , nInterestRate AS FLOAT , nPeriods AS FLOAT ) AS FLOAT // ensures that both values are always positive diff --git a/src/Runtime/XSharp.VFP/Functions.prg b/src/Runtime/XSharp.VFP/Functions.prg index c794a1659d..ad6c376c15 100644 --- a/src/Runtime/XSharp.VFP/Functions.prg +++ b/src/Runtime/XSharp.VFP/Functions.prg @@ -13,11 +13,13 @@ USING XSharp.Internal /// The Init event is executed when you issue CREATEOBJECT( ) and allows you to initialize the object. /// The object that was created /// CreateInstance +[FoxProFunction("CREATEOBJECT", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION CreateObject(cClassName, _args ) AS OBJECT CLIPPER // The pseudo function _ARGS() returns the Clipper arguments array RETURN CreateInstance(_ARGS()) /// +[FoxProFunction("CREATEOBJECTEX", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION CreateObjectEx(cClsIdOrcProgId, cComputerName , cIID ) AS OBJECT CLIPPER // The pseudo function _ARGS() returns the Clipper arguments array RETURN CreateInstance(_ARGS()) @@ -61,9 +63,8 @@ Function SetFoxCollation(cCollation as STRING) AS STRING ENDIF RETURN cOld - /// - +[FoxProFunction("ICASE", FoxFunctionCategory.General, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; function ICase(lCondition, eResult, lCondition2, eResult2, eOtherwiseResult) as usual CLIPPER LOCAL nCount := PCount() AS LONG // loop through the actual parameters. The odd parameters should be logic @@ -113,8 +114,8 @@ FUNCTION __VfpStr( resid AS DWORD , args PARAMS OBJECT[]) AS STRING FUNCTION VarType( eExpression AS USUAL) AS STRING RETURN VarType(eExpression, FALSE) - /// +[FoxProFunction("VARTYPE", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION VarType( eExpression AS USUAL, lNullDataType AS LOGIC) AS STRING IF IsNil(eExpression) IF ! lNullDataType diff --git a/src/Runtime/XSharp.VFP/GetWord.prg b/src/Runtime/XSharp.VFP/GetWord.prg index 99c9b2071e..f94da2a5b7 100644 --- a/src/Runtime/XSharp.VFP/GetWord.prg +++ b/src/Runtime/XSharp.VFP/GetWord.prg @@ -420,6 +420,7 @@ INTERNAL FUNCTION GetDefaultWordHandler() AS GetWordHandler RETURN loSrch /// +[FoxProFunction("GETWORDCOUNT", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION GetWordCount( cString AS STRING) AS LONG LOCAL loSrch := GetDefaultWordHandler() AS GetWordHandler RETURN loSrch:oActiveObjc:GetWordCount( cString) @@ -447,6 +448,7 @@ INTERNAL FUNCTION GetWordCount( cString AS STRING, cDelimiters AS STRING, tnSwit RETURN lnReturn /// +[FoxProFunction("GETWORDNUM", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION GetWordNum( cString AS STRING, nIndex AS INT) AS STRING LOCAL loSrch := GetDefaultWordHandler() AS GetWordHandler RETURN loSrch:oActiveObjc:GetWordNum( cString, nIndex) diff --git a/src/Runtime/XSharp.VFP/Keyboard.prg b/src/Runtime/XSharp.VFP/Keyboard.prg index c6d5e54db7..7bbff1bc4a 100644 --- a/src/Runtime/XSharp.VFP/Keyboard.prg +++ b/src/Runtime/XSharp.VFP/Keyboard.prg @@ -47,6 +47,7 @@ INTERNAL PARTIAL CLASS Win32 END CLASS /// +[FoxProFunction("NUMLOCK", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION NumLock() AS LOGIC STRICT RETURN __IsKeyToggled( Win32.VK_NUMLOCK ) @@ -72,6 +73,7 @@ VAR lPrevious := NumLock() RETURN lPrevious /// +[FoxProFunction("CAPSLOCK", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION CapsLock() AS LOGIC STRICT RETURN __IsKeyToggled( Win32.VK_CAPITAL ) @@ -99,6 +101,7 @@ VAR lPrevious := CapsLock() RETURN lPrevious /// +[FoxProFunction("INSMODE", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION InsMode() AS LOGIC STRICT RETURN __IsKeyToggled( Win32.VK_INSERT ) diff --git a/src/Runtime/XSharp.VFP/MiscFunctions.prg b/src/Runtime/XSharp.VFP/MiscFunctions.prg index ff14e86b50..8118c6f983 100644 --- a/src/Runtime/XSharp.VFP/MiscFunctions.prg +++ b/src/Runtime/XSharp.VFP/MiscFunctions.prg @@ -6,39 +6,40 @@ /// +[FoxProFunction("ID", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION Id( ) AS STRING RETURN Sys(0) /// +[FoxProFunction("ISCOLOR", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION IsColor( ) AS LOGIC RETURN TRUE /// +[FoxProFunction("ISMOUSE", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION IsMouse( ) AS LOGIC RETURN TRUE /// +[FoxProFunction("NVL", FoxFunctionCategory.General, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION NVL( eExpression1, eExpression2) AS USUAL CLIPPER IF IsNil(eExpression1) RETURN eExpression2 ENDIF RETURN eExpression1 - /// +[FoxProFunction("EVL", FoxFunctionCategory.General, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION EVL( eExpression1 AS USUAL, eExpression2 AS USUAL) AS USUAL IF ! Empty(eExpression1) RETURN eExpression1 ENDIF RETURN eExpression2 - //#translate CAST ( AS ) => __FoxCast(,<(type)>) //#translate CAST ( AS ( ) ) => __FoxCast(,<(type)>, ,-1) //#translate CAST ( AS ( ,) ) => __FoxCast(,<(type)>, ,) - - FUNCTION __FoxCast(expr AS USUAL, targetType AS STRING, nLen AS LONG, nDec AS LONG) AS USUAL LOCAL result := NIL AS USUAL LOCAL error := FALSE AS LOGIC @@ -191,6 +192,7 @@ FUNCTION __FoxCast(expr AS USUAL, targetType AS STRING, nLen AS LONG, nDec AS LO RETURN result /// + [FoxProFunction("ISBLANK", FoxFunctionCategory.General, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION IsBlank(eExpression AS USUAL) AS LOGIC IF eExpression == NIL .OR. eExpression == System.DBNull.Value RETURN FALSE @@ -216,6 +218,7 @@ FUNCTION __FoxCast(expr AS USUAL, targetType AS STRING, nLen AS LONG, nDec AS LO ENDFUNC /// +[FoxProFunction("ISNULL", FoxFunctionCategory.General, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION IsNull(eExpression AS USUAL) AS LOGIC IF eExpression == NIL RETURN TRUE diff --git a/src/Runtime/XSharp.VFP/NotSupported.prg b/src/Runtime/XSharp.VFP/NotSupported.prg index 93b20cbad3..90a6b9f2dd 100644 --- a/src/Runtime/XSharp.VFP/NotSupported.prg +++ b/src/Runtime/XSharp.VFP/NotSupported.prg @@ -6,303 +6,378 @@ #pragma options("vo15", on) [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ADLLS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION ADLLS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ADOCKSTATE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION ADOCKSTATE( ) AS USUAL CLIPPER RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AERROR", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION AERROR( ) AS USUAL CLIPPER RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AEVENTS", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION AEVENTS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AFONT", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION AFONT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AGETCLASS", FoxFunctionCategory.ClassAndObject, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION AGETCLASS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AINSTANCE", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION AINSTANCE( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ALANGUAGE", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION ALANGUAGE( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AMOUSEOBJ", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION AMOUSEOBJ( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("APROCINFO", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION APROCINFO( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ASELOBJ", FoxFunctionCategory.ClassAndObject, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION ASELOBJ( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("AVCXCLASSES", FoxFunctionCategory.ClassAndObject, FoxEngine.RuntimeCore, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION AVCXCLASSES( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("BAR", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION BAR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("BARCOUNT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION BARCOUNT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("BARPROMPT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION BARPROMPT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("BINDEVENT", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION BINDEVENT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("COMARRAY", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION COMARRAY( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("COMCLASSINFO", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION COMCLASSINFO( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("COMPROP", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION COMPROP( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("COMRETURNERROR", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION COMRETURNERROR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEABORTTRANS", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDEAbortTrans( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEADVISE", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDEAdvise( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEENABLED", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDEEnabled( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEEXECUTE", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDEExecute( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEINITIATE", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDEInitiate( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDELASTERROR", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDELastError( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEPOKE", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDEPoke( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDEREQUEST", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDERequest( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDESETOPTION", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDESetOption( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDESETSERVICE", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDESetService( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDESETTOPIC", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDESetTopic( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("DDETERMINATE", FoxFunctionCategory.General, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION DDETerminate( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("EDITSOURCE", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION EDITSOURCE( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ERROR", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION ERROR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("EVENTHANDLER", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION EVENTHANDLER( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("FKLABEL", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION FKLABEL( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("FKMAX", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION FKMAX( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("GETBAR", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION GETBAR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("GETINTERFACE", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION GETINTERFACE( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("GETPAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION GETPAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("HOME", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION HOME( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("INKEY", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION INKEY( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ISLEADBYTE", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION ISLEADBYTE( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("LASTKEY", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION LASTKEY( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MEMORY", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION MEMORY( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MENU", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION MENU( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MESSAGE", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION MESSAGE( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MRKBAR", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION MRKBAR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MRKPAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION MRKPAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MROW", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION MROW( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("MWINDOW", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION MWINDOW( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("OBJTOCLIENT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION OBJTOCLIENT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("ON", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION ON( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION PAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PADPROMPT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION PADPROMPT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PARAMETERS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION PARAMETERS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PEMSTATUS", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION PEMSTATUS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("POPUP", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION POPUP( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PRINTSTATUS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION PRINTSTATUS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PRMBAR", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION PRMBAR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PRMPAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION PRMPAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("PROMPT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION PROMPT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("RDLEVEL", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION RDLEVEL( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("READKEY", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Low)]; FUNCTION READKEY( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("SCOLS", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION SCOLS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("SKPBAR", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION SKPBAR( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("SKPPAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION SKPPAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("SROWS", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION SROWS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("UNBINDEVENTS", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.NotSupported, FoxCriticality.High)]; FUNCTION UNBINDEVENTS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("UPDATED", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION UPDATED( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("VARREAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION VARREAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WBORDER", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WBORDER( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WCHILD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WCHILD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WCOLS", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WCOLS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WDOCKABLE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WDOCKABLE( ) RETURN NIL @@ -312,50 +387,62 @@ RETURN NIL // RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WFONT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WFONT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WLAST", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WLAST( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WLCOL", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WLCOL( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WLROW", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WLROW( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WMAXIMUM", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WMAXIMUM( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WMINIMUM", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WMINIMUM( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WONTOP", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WONTOP( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WOUTPUT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WOUTPUT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WPARENT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WPARENT( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WREAD", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WREAD( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WROWS", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WROWS( ) RETURN NIL [Obsolete( "This function will not be supported" )]; +[FoxProFunction("WTITLE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.NotSupported, FoxCriticality.Medium)]; FUNCTION WTITLE( ) RETURN NIL diff --git a/src/Runtime/XSharp.VFP/NumericFunctions.prg b/src/Runtime/XSharp.VFP/NumericFunctions.prg index e32372ed94..097919eac1 100644 --- a/src/Runtime/XSharp.VFP/NumericFunctions.prg +++ b/src/Runtime/XSharp.VFP/NumericFunctions.prg @@ -9,19 +9,23 @@ USING System.Collections.Generic USING System.Text /// +[FoxProFunction("MTON", FoxFunctionCategory.MathAndNumeric, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION MToN( mExpression AS CURRENCY) AS FLOAT RETURN (FLOAT) mExpression /// +[FoxProFunction("NTOM", FoxFunctionCategory.MathAndNumeric, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION NToM( nExpression AS FLOAT) AS CURRENCY RETURN (CURRENCY) nExpression /// +[FoxProFunction("CEILING", FoxFunctionCategory.MathAndNumeric, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION Ceiling (nExpression) AS USUAL CLIPPER RETURN Ceil(nExpression) /// +[FoxProFunction("SIGN", FoxFunctionCategory.MathAndNumeric, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION Sign( nExpression AS USUAL) AS LONG EnforceNumeric(REF nExpression) IF nExpression < 0 diff --git a/src/Runtime/XSharp.VFP/PrinterFunctions.prg b/src/Runtime/XSharp.VFP/PrinterFunctions.prg index b6a6bc6469..c84d906317 100644 --- a/src/Runtime/XSharp.VFP/PrinterFunctions.prg +++ b/src/Runtime/XSharp.VFP/PrinterFunctions.prg @@ -9,6 +9,7 @@ USING System.Drawing.Printing USING System.Windows.Forms /// +[FoxProFunction("APRINTERS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION APrinters ( ArrayName , nValue ) AS INT CLIPPER LOCAL cPrinterName AS STRING LOCAL iCount AS INT diff --git a/src/Runtime/XSharp.VFP/StringFunctions.prg b/src/Runtime/XSharp.VFP/StringFunctions.prg index 66b0c8e656..3a8e03566f 100644 --- a/src/Runtime/XSharp.VFP/StringFunctions.prg +++ b/src/Runtime/XSharp.VFP/StringFunctions.prg @@ -27,6 +27,7 @@ END CLASS /// /// /// +[FoxProFunction("ADDBS", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION AddBs (cPath AS STRING) AS STRING IF String.IsNullOrEmpty(cPath) RETURN "" @@ -39,6 +40,7 @@ FUNCTION AddBs (cPath AS STRING) AS STRING /// +[FoxProFunction("FORCEEXT", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION ForceExt( cFileName AS STRING, cExtension AS STRING) AS STRING IF String.IsNullOrEmpty(cFileName) RETURN "" @@ -72,6 +74,7 @@ FUNCTION ForceExt( cFileName AS STRING, cExtension AS STRING, tlOptAsVfp9 AS LOG RETURN cResult /// +[FoxProFunction("FORCEPATH", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION ForcePath( cFileName AS STRING, cPath AS STRING) AS STRING *-- check if path needs also check... IF String.IsNullOrEmpty(cFileName) @@ -84,6 +87,7 @@ FUNCTION ForcePath( cFileName AS STRING, cPath AS STRING) AS STRING /// /// +[FoxProFunction("JUSTDRIVE", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION JustDrive(cPath AS STRING) AS STRING IF String.IsNullOrEmpty(cPath) RETURN "" @@ -95,6 +99,7 @@ FUNCTION JustDrive(cPath AS STRING) AS STRING /// /// +[FoxProFunction("JUSTEXT", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION JustExt(cPath AS STRING) AS STRING *-- Default for new parameter lOptWithLeadingDot ist .f. *-- As returning all extensions with leading dot could lead to breaking changes @@ -116,6 +121,7 @@ FUNCTION JustExt(cPath AS STRING, lOptWithLeadingDot AS LOGIC) AS STRING /// /// +[FoxProFunction("JUSTFNAME", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION JustFName(cPath AS STRING) AS STRING IF String.IsNullOrEmpty(cPath) RETURN "" @@ -126,6 +132,7 @@ FUNCTION JustFName(cPath AS STRING) AS STRING /// /// +[FoxProFunction("JUSTPATH", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION JustPath(cPath AS STRING) AS STRING IF String.IsNullOrEmpty(cPath) RETURN "" @@ -140,6 +147,7 @@ FUNCTION JustPath(cPath AS STRING) AS STRING /// /// +[FoxProFunction("JUSTSTEM", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION JustStem(cPath AS STRING) AS STRING IF String.IsNullOrEmpty(cPath) RETURN "" @@ -148,40 +156,43 @@ FUNCTION JustStem(cPath AS STRING) AS STRING RETURN result /// +[FoxProFunction("LEFTC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION LeftC( cExpression AS STRING, nExpression AS DWORD) AS STRING RETURN Left(cExpression, nExpression) /// +[FoxProFunction("LENC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION LenC( cExpression AS STRING ) AS DWORD RETURN SLen(cExpression) /// +[FoxProFunction("LIKEC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION LikeC( cExpression1, cExpression2) AS LOGIC CLIPPER RETURN Like(cExpression1, cExpression2) - /// +[FoxProFunction("RIGHTC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION RightC( cExpression AS STRING, nCharacters AS DWORD) AS STRING RETURN Right(cExpression, nCharacters) /// +[FoxProFunction("STUFFC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION StuffC( cExpression, nStartReplacement, nCharactersReplaced, cReplacement) AS STRING CLIPPER RETURN Stuff(cExpression, nStartReplacement, nCharactersReplaced, cReplacement) /// +[FoxProFunction("SUBSTRC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION SubStrC(cExpression, nStartPosition , nCharactersReturned ) AS STRING CLIPPER RETURN SubStr(cExpression, nStartPosition, nCharactersReturned) - - - - /// +[FoxProFunction("RATC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION RAtC(cSearchExpression AS STRING , cExpressionSearched AS STRING , dwOccurrence := 1 AS DWORD ) AS DWORD RETURN RAt(cSearchExpression , cExpressionSearched , dwOccurrence ) /// +[FoxProFunction("RAT", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION RAt(cSearchExpression AS STRING , cExpressionSearched AS STRING , dwOccurrence := 1 AS DWORD ) AS DWORD LOCAL dwPosition, dwOccurred AS DWORD LOCAL i , iPosition AS INT @@ -230,13 +241,13 @@ FUNCTION RAt(cSearchExpression AS STRING , cExpressionSearched AS STRING , dwOcc ENDIF RETURN dwPosition - - /// +[FoxProFunction("CHRTRANC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION ChrTranC( cSearchIn AS STRING , cSearchFor AS STRING, cReplaceWith AS STRING ) AS STRING RETURN ChrTran( cSearchIn , cSearchFor , cReplaceWith ) /// +[FoxProFunction("CHRTRAN", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION ChrTran( cSearchIn AS STRING , cSearchFor AS STRING, cReplaceWith AS STRING ) AS STRING LOCAL cRetVal ,cReplaceChar AS STRING LOCAL i AS INT @@ -264,10 +275,8 @@ FUNCTION ChrTran( cSearchIn AS STRING , cSearchFor AS STRING, cReplaceWith AS S RETURN cRetVal - - - /// +[FoxProFunction("AT", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION At(cSearchExpression AS STRING, cExpressionSearched AS STRING, dwOccurrence := 1 AS DWORD) AS DWORD LOCAL position := 0 AS DWORD IF ( cExpressionSearched != NULL .AND. cSearchExpression != NULL ) @@ -285,11 +294,13 @@ FUNCTION At(cSearchExpression AS STRING, cExpressionSearched AS STRING, dwOccurr /// /// This is an alias for the At() function. X# works with unicode and the difference /// between single byte and multi byte characters does not exist in Unicode +[FoxProFunction("AT_C", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION At_C(cSearchExpression AS STRING, cExpressionSearched AS STRING, dwOccurrence := 1 AS DWORD) AS DWORD RETURN At(cSearchExpression, cExpressionSearched, dwOccurrence) /// +[FoxProFunction("ATC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION AtC(cSearchExpression AS STRING, cExpressionSearched AS STRING, dwOccurrence := 1 AS DWORD) AS DWORD LOCAL position := 0 AS DWORD IF ( cExpressionSearched != NULL .AND. cSearchExpression != NULL ) @@ -307,17 +318,18 @@ FUNCTION AtC(cSearchExpression AS STRING, cExpressionSearched AS STRING, dwOccur /// /// This is an alias for the AtC() function. X# works with unicode and the difference /// between single byte and multi byte characters does not exist in Unicode - +[FoxProFunction("ATCC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION AtCC(cSearchExpression AS STRING, cExpressionSearched AS STRING, dwOccurrence := 1 AS DWORD) AS DWORD RETURN AtC(cSearchExpression, cExpressionSearched, dwOccurrence) /// /// Specifies an expression to remove leading and trailing spaces or 0 bytes from /// Specifies if trimming is case-sensitive when one or more parse characters -/// (cParseChar, cParseChar2, … are included. Trimming is case-sensitive if nFlags is zero or is omitted. +/// (cParseChar, cParseChar2, etc.) are included. Trimming is case-sensitive if nFlags is zero or is omitted. /// Trimming is case-insensitive if nFlags = 1. /// Specifies one or more character strings that are trimmed from the beginning of cExpression. /// If cParseChar isn't included, then leading spaces or 0 bytes are removed from Expression. +[FoxProFunction("ALLTRIM", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION AllTrim(Expression AS STRING, Flags AS INT, TrimChars PARAMS STRING[]) AS STRING STRICT RETURN Trim_helper(.T., .T., Expression, Flags, TrimChars) @@ -325,6 +337,7 @@ FUNCTION AllTrim(Expression AS STRING, Flags AS INT, TrimChars PARAMS STRING[]) /// Specifies an expression to remove leading spaces or 0 bytes from, respectively /// Specifies one or more character strings that are trimmed from the beginning of cExpression. /// If cParseChar isn't included, then leading spaces or 0 bytes are removed from Expression. +[FoxProFunction("LTRIM", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION LTrim(Expression AS STRING, Flags AS INT, TrimChars PARAMS STRING[]) AS STRING STRICT RETURN Trim_helper(.T., .F., Expression, Flags, TrimChars) @@ -332,16 +345,19 @@ FUNCTION LTrim(Expression AS STRING, Flags AS INT, TrimChars PARAMS STRING[]) AS /// Specifies an expression to remove leading spaces or 0 bytes from, respectively /// Specifies one or more character strings that are trimmed from the beginning of cExpression. /// If cParseChar isn't included, then leading spaces or 0 bytes are removed from Expression. +[FoxProFunction("RTRIM", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION RTrim(Expression AS STRING, Flags AS INT, TrimChars PARAMS STRING[]) AS STRING STRICT RETURN Trim_helper(.F., .T., Expression, Flags, TrimChars) /// /// Specifies an expression to remove trailing spaces or 0 bytes from /// Specifies if trimming is case-sensitive when one or more parse characters -/// (cParseChar, cParseChar2, … are included. Trimming is case-sensitive if nFlags is zero or is omitted. +/// (cParseChar, cParseChar2, +/// are included. Trimming is case-sensitive if nFlags is zero or is omitted. /// Trimming is case-insensitive if nFlags = 1. /// Specifies one or more character strings that are trimmed from the beginning of cExpression. /// If cParseChar isn't included, then leading spaces or 0 bytes are removed from Expression. +[FoxProFunction("TRIM", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION Trim(Expression AS STRING, Flags AS INT, TrimChars PARAMS STRING[]) AS STRING STRICT RETURN Trim_helper(.F., .T., Expression, Flags, TrimChars) @@ -403,10 +419,12 @@ END FUNCTION /// +[FoxProFunction("TRANSFORM", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Partial, FoxCriticality.High)]; FUNCTION Transform( uValue AS USUAL ) AS STRING RETURN AsString(uValue) /// +[FoxProFunction("STR", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION Str(nNumber ,nLength ,nDecimals ) AS STRING CLIPPER IF PCount() < 1 .or. pCount() > 3 RETURN "" @@ -416,6 +434,7 @@ FUNCTION Str(nNumber ,nLength ,nDecimals ) AS STRING CLIPPER RETURN XSharp.RT.Functions.Str(nNumber, nLength, nDecimals) /// +[FoxProFunction("STREXTRACT", FoxFunctionCategory.StringAndCharacter, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION StrExtract(cSearchExpression as string, cBeginDelim as string, cEndDelim := "" as string, nOccurrence := 1 as int, nFlag := 0 as int) AS STRING if String.IsNullOrEmpty(cSearchExpression) || String.IsNullOrEmpty(cBeginDelim) return "" @@ -491,6 +510,7 @@ FUNCTION StrExtract(cSearchExpression as string, cBeginDelim as string, cEndDeli END FUNCTION /// +[FoxProFunction("DIFFERENCE", FoxFunctionCategory.StringAndCharacter, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Low)]; FUNCTION Difference( cExpression1 as string, cExpression2 as string) as int if String.IsNullOrEmpty(cExpression1) || String.IsNullOrEmpty(cExpression2) return 0 @@ -512,6 +532,7 @@ FUNCTION Difference( cExpression1 as string, cExpression2 as string) as int END FUNCTION /// +[FoxProFunction("STRCONV", FoxFunctionCategory.StringAndCharacter, FoxEngine.RuntimeCore, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION StrConv(cExpression AS USUAL, nConversionSetting AS INT, nRegionalIdentifier := 0 AS INT, nRegionalIDType := 0 AS INT) AS USUAL local nCP := XSharp.RuntimeState.WinCodePage as int @@ -693,3 +714,4 @@ INTERNAL STATIC CLASS StrConvHelpers end method END CLASS + diff --git a/src/Runtime/XSharp.VFP/SystemFunctions.prg b/src/Runtime/XSharp.VFP/SystemFunctions.prg index bf3a515101..415e0b8920 100644 --- a/src/Runtime/XSharp.VFP/SystemFunctions.prg +++ b/src/Runtime/XSharp.VFP/SystemFunctions.prg @@ -7,6 +7,7 @@ USING System.Text /// +[FoxProFunction("SYS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Partial, FoxCriticality.High)]; FUNCTION Sys(nSetting, uNewValue, uContextParam3) AS USUAL CLIPPER LOCAL retVal AS OBJECT retVal := FALSE diff --git a/src/Runtime/XSharp.VFP/TextOutPut.prg b/src/Runtime/XSharp.VFP/TextOutPut.prg index e41b332cbc..1dcf3bf983 100644 --- a/src/Runtime/XSharp.VFP/TextOutPut.prg +++ b/src/Runtime/XSharp.VFP/TextOutPut.prg @@ -270,6 +270,7 @@ function __TextEnd(cString as string) as string /// [NeedsAccessToLocals(FALSE)]; +[FoxProFunction("TEXTMERGE", FoxFunctionCategory.StringAndCharacter, FoxEngine.Macro, FoxFunctionStatus.Full, FoxCriticality.High)]; function TextMerge( cExpression , lRecursive , cLeftDelim , cRightDelim) as string clipper var delims := SetTextMergeDelimiters() if ! IsString(cExpression) diff --git a/src/Runtime/XSharp.VFP/ToDo-A.prg b/src/Runtime/XSharp.VFP/ToDo-A.prg index 4c3e348fd7..f62e4be234 100644 --- a/src/Runtime/XSharp.VFP/ToDo-A.prg +++ b/src/Runtime/XSharp.VFP/ToDo-A.prg @@ -8,41 +8,42 @@ /// -- todo -- /// +[FoxProFunction("ACLASS", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION AClass(ArrayName, oExpression) THROW NotImplementedException{} //RETURN 0 - - /// -- todo -- /// +[FoxProFunction("ADBOBJECTS", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION ADBObjects(ArrayName, cSetting) THROW NotImplementedException{} //RETURN 0 /// -- todo -- /// +[FoxProFunction("ANETRESOURCES", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION ANetResources (ArrayName, cNetworkName, nResourceType) THROW NotImplementedException{} //RETURN 0 - - /// -- todo -- /// +[FoxProFunction("ASESSIONS", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.DataSession, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION ASessions (ArrayName) THROW NotImplementedException{} //RETURN 0 /// -- todo -- /// +[FoxProFunction("ASTACKINFO", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION AStackInfo (ArrayName ) THROW NotImplementedException{} //RETURN 0 - /// -- todo -- /// +[FoxProFunction("ATAGINFO", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION ATagInfo (ArrayName ,cCDXName , uArea ) THROW NotImplementedException{} //RETURN 0 diff --git a/src/Runtime/XSharp.VFP/ToDo-B.prg b/src/Runtime/XSharp.VFP/ToDo-B.prg index dfa0d5b598..370a98cecc 100644 --- a/src/Runtime/XSharp.VFP/ToDo-B.prg +++ b/src/Runtime/XSharp.VFP/ToDo-B.prg @@ -7,6 +7,7 @@ /// -- todo -- /// #pragma options("vo15", on) +[FoxProFunction("BINTOC", FoxFunctionCategory.StringAndCharacter, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION BinToc (nExpression , eFlags ) THROW NotImplementedException{} //RETURN "" diff --git a/src/Runtime/XSharp.VFP/ToDo-C.prg b/src/Runtime/XSharp.VFP/ToDo-C.prg index 16ef01d978..0a80b69cd0 100644 --- a/src/Runtime/XSharp.VFP/ToDo-C.prg +++ b/src/Runtime/XSharp.VFP/ToDo-C.prg @@ -8,21 +8,21 @@ /// -- todo -- /// #pragma options("vo15", on) +[FoxProFunction("CANDIDATE", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION Candidate (nIndexNumber , uArea) THROW NotImplementedException{} // RETURN FALSE - /// -- todo -- /// - +[FoxProFunction("COMPOBJ", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION CompObj (oExpression1, oExpression2) THROW NotImplementedException{} // RETURN FALSE /// -- todo -- /// - +[FoxProFunction("CPCONVERT", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION CpConvert ( nCurrentCodePage, nNewCodePage, cExpression) THROW NotImplementedException{} // RETURN "" diff --git a/src/Runtime/XSharp.VFP/ToDo-D.prg b/src/Runtime/XSharp.VFP/ToDo-D.prg index df6888e3cc..f9883b121b 100644 --- a/src/Runtime/XSharp.VFP/ToDo-D.prg +++ b/src/Runtime/XSharp.VFP/ToDo-D.prg @@ -11,16 +11,14 @@ /// -- todo -- /// - +[FoxProFunction("DISPLAYPATH", FoxFunctionCategory.FileAndIO, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION DisplayPath( cFilename, nMaxLength ) THROW NotImplementedException{} // RETURN "" - - /// -- todo -- /// - +[FoxProFunction("DROPOFFLINE", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION DropOffLine( cViewName ) THROW NotImplementedException{} // RETURN FALSE diff --git a/src/Runtime/XSharp.VFP/ToDo-EF.prg b/src/Runtime/XSharp.VFP/ToDo-EF.prg index bc95de2bc4..2b06a9a874 100644 --- a/src/Runtime/XSharp.VFP/ToDo-EF.prg +++ b/src/Runtime/XSharp.VFP/ToDo-EF.prg @@ -9,14 +9,14 @@ /// -- todo -- /// - +[FoxProFunction("FLDLIST", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION FldList( ) AS USUAL THROW NotImplementedException{} // RETURN NIL /// -- todo -- /// - +[FoxProFunction("FONTMETRIC", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION FontMetric( nAttribute , cFontName, nFontSize , cFontStyle) AS LONG CLIPPER THROW NotImplementedException{} // RETURN 0 diff --git a/src/Runtime/XSharp.VFP/ToDo-G.prg b/src/Runtime/XSharp.VFP/ToDo-G.prg index e641f71cac..047b900839 100644 --- a/src/Runtime/XSharp.VFP/ToDo-G.prg +++ b/src/Runtime/XSharp.VFP/ToDo-G.prg @@ -6,80 +6,77 @@ /// -- todo -- /// #pragma options("vo15", on) +[FoxProFunction("GETAUTOINCVALUE", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION GetAutoIncValue( nDataSessionNumber ) THROW NotImplementedException{} // RETURN 0 - - - - /// -- todo -- /// - +[FoxProFunction("GETCP", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION GetCp( nCodePage , cText , cDialogTitle ) THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("GETCURSORADAPTER", FoxFunctionCategory.CursorAndTable, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION GetCursorAdapter( cAlias ) THROW NotImplementedException{} // RETURN NULL /// -- todo -- /// - +[FoxProFunction("GETDIR", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION GetDir( cDirectory , cText , cCaption , nFlags , lRootOnly) AS STRING THROW NotImplementedException{} // RETURN "" /// -- todo -- /// - +[FoxProFunction("GETFILE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION GetFile( cFileExtensions , cText , cOpenButtonCaption,nButtonType, cTitleBarCaption ) AS STRING THROW NotImplementedException{} // RETURN "" /// -- todo -- /// - +[FoxProFunction("GETFLDSTATE", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION GetFldState( uField , uArea) AS USUAL THROW NotImplementedException{} // RETURN NIL /// -- todo -- /// - +[FoxProFunction("GETNEXTMODIFIED", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION GetNextModified( nRecordNumber , uArea , lNoFire) THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("GETOBJECT", FoxFunctionCategory.ClassAndObject, FoxEngine.Interop, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION GetObject( uType , cClassName) AS OBJECT THROW NotImplementedException{} // RETURN NULL_OBJECT /// -- todo -- /// - +[FoxProFunction("GETPICT", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION GetPict( cFileExtensions , cFileNameCaption , cOpenButtonCaption) AS STRING THROW NotImplementedException{} // RETURN "" /// -- todo -- /// - +[FoxProFunction("GETPRINTER", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION GetPrinter( ) AS STRING THROW NotImplementedException{} // RETURN "" /// -- todo -- /// - +[FoxProFunction("GETRESULTSET", FoxFunctionCategory.SQL, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION GetResultSet( ) AS LONG THROW NotImplementedException{} // RETURN 0 diff --git a/src/Runtime/XSharp.VFP/ToDo-HI.prg b/src/Runtime/XSharp.VFP/ToDo-HI.prg index 445d7b8832..b385849f62 100644 --- a/src/Runtime/XSharp.VFP/ToDo-HI.prg +++ b/src/Runtime/XSharp.VFP/ToDo-HI.prg @@ -8,60 +8,56 @@ /// -- todo -- /// - +[FoxProFunction("IMESTATUS", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION ImeStatus( nExpression ) AS LONG THROW NotImplementedException{} // RETURN 0 - /// -- todo -- /// - +[FoxProFunction("INDBC", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION InDbc( cDatabaseObjectName, cType ) AS LOGIC THROW NotImplementedException{} // RETURN FALSE /// -- todo -- /// - +[FoxProFunction("INDEXSEEK", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION IndexSeek( eExpression , lMovePointer , uArea, uIndex) AS LOGIC THROW NotImplementedException{} // RETURN FALSE /// -- todo -- /// - +[FoxProFunction("INPUTBOX", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION InputBox( cInputPrompt , cDialogCaption , cDefaultValue , nTimeout ,cTimeoutValue,cCancelValue) AS STRING THROW NotImplementedException{} // RETURN "" /// -- todo -- /// - +[FoxProFunction("ISEXCLUSIVE", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION IsExclusive( uArea, nType) AS LOGIC THROW NotImplementedException{} // RETURN FALSE - - /// -- todo -- /// - +[FoxProFunction("ISMEMOFETCHED", FoxFunctionCategory.SQL, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION IsMemoFetched( uField , uArea) AS LOGIC THROW NotImplementedException{} // RETURN FALSE /// -- todo -- /// - +[FoxProFunction("ISPEN", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION IsPen( ) AS LOGIC THROW NotImplementedException{} // RETURN FALSE - /// -- todo -- /// - +[FoxProFunction("ISTRANSACTABLE", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION IsTransactable( uArea ) AS LOGIC THROW NotImplementedException{} // RETURN FALSE diff --git a/src/Runtime/XSharp.VFP/ToDo-KLM.prg b/src/Runtime/XSharp.VFP/ToDo-KLM.prg index da35cb0207..837473c195 100644 --- a/src/Runtime/XSharp.VFP/ToDo-KLM.prg +++ b/src/Runtime/XSharp.VFP/ToDo-KLM.prg @@ -8,7 +8,7 @@ #pragma options("vo15", on) /// -- todo -- /// - +[FoxProFunction("KEYMATCH", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION KeyMatch(eIndexKey , nIndexNumber , uArea) AS LOGIC THROW NotImplementedException{} // RETURN FALSE @@ -16,14 +16,14 @@ FUNCTION KeyMatch(eIndexKey , nIndexNumber , uArea) AS LOGIC /// -- todo -- /// - +[FoxProFunction("LINENO", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION LineNo(nPos ) AS LONG THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("LOADPICTURE", FoxFunctionCategory.General, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION LoadPicture( cFileName ) AS OBJECT THROW NotImplementedException{} // RETURN NULL_OBJECT @@ -32,6 +32,7 @@ FUNCTION LoadPicture( cFileName ) AS OBJECT /// -- todo -- /// // Example: = LOCFILE("","PRG File:prg;Compiled:fxp;Backup:bak","Bestand") +[FoxProFunction("LOCFILE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION LocFile( cFileName , cFileExtensions , cFileNameCaption ) AS STRING THROW NotImplementedException{} // RETURN "" @@ -39,14 +40,14 @@ FUNCTION LocFile( cFileName , cFileExtensions , cFileNameCaption ) AS STRING /// -- todo -- /// - +[FoxProFunction("LOOKUP", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION Lookup( ReturnField, eSearchExpression, SearchedField , cTagName) AS USUAL THROW NotImplementedException{} // RETURN NIL /// -- todo -- /// - +[FoxProFunction("MAKETRANSACTABLE", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION MakeTransactable( uArea ) AS LOGIC THROW NotImplementedException{} // RETURN FALSE diff --git a/src/Runtime/XSharp.VFP/ToDo-NOP.prg b/src/Runtime/XSharp.VFP/ToDo-NOP.prg index 31e7bf97c6..94389b9653 100644 --- a/src/Runtime/XSharp.VFP/ToDo-NOP.prg +++ b/src/Runtime/XSharp.VFP/ToDo-NOP.prg @@ -9,32 +9,28 @@ /// -- todo -- /// - +[FoxProFunction("NEWOBJECT", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION NewObject( cClassName ,_args) AS OBJECT THROW NotImplementedException{} // RETURN NULL_OBJECT /// -- todo -- /// - +[FoxProFunction("NORMALIZE", FoxFunctionCategory.General, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION Normalize( cExpression ) AS STRING THROW NotImplementedException{} // RETURN "" - - - /// -- todo -- /// - +[FoxProFunction("OLDVAL", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; 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 @@ -42,28 +38,28 @@ FUNCTION PCol( ) AS LONG /// -- todo -- /// // Note needs Database Container support +[FoxProFunction("PRIMARY", FoxFunctionCategory.Database, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; 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)]; FUNCTION PrtInfo( nPrinterSetting , cPrinterName ) AS LONG THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("PUTFILE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION PutFile( cCustomText , cFileName, cFileExtensions) AS STRING THROW NotImplementedException{} // RETURN "" diff --git a/src/Runtime/XSharp.VFP/ToDo-QR.prg b/src/Runtime/XSharp.VFP/ToDo-QR.prg index b710930052..59c60cf8b0 100644 --- a/src/Runtime/XSharp.VFP/ToDo-QR.prg +++ b/src/Runtime/XSharp.VFP/ToDo-QR.prg @@ -5,38 +5,34 @@ // - #pragma options("vo15", on) /// -- todo -- /// - +[FoxProFunction("RAISEEVENT", FoxFunctionCategory.ClassAndObject, FoxEngine.LanguageCore, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION RaiseEvent( oEventSource, cEvent , _args) AS LOGIC THROW NotImplementedException{} // RETURN FALSE - /// -- todo -- /// - +[FoxProFunction("REFRESH", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION Refresh( nRecords , nRecordOffset , uArea ) AS LONG THROW NotImplementedException{} // RETURN 0 - - /// -- todo -- /// - +[FoxProFunction("REQUERY", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION Requery( uArea ) AS LONG THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("RGBSCHEME", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION RgbScheme(nColorSchemeNumber , nColorPairPosition ) AS STRING THROW NotImplementedException{} // RETURN "" diff --git a/src/Runtime/XSharp.VFP/ToDo-S.prg b/src/Runtime/XSharp.VFP/ToDo-S.prg index f5a30f2cb1..cd69cc6c42 100644 --- a/src/Runtime/XSharp.VFP/ToDo-S.prg +++ b/src/Runtime/XSharp.VFP/ToDo-S.prg @@ -7,28 +7,28 @@ /// -- todo -- /// - +[FoxProFunction("SAVEPICTURE", FoxFunctionCategory.UIAndWindow, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION SavePicture( oObjectReference, cFileName ) AS LOGIC THROW NotImplementedException{} // RETURN FALSE /// -- todo -- /// - +[FoxProFunction("SCHEME", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Low)]; FUNCTION Scheme( nSchemeNumber , nColorPairNumber) AS STRING THROW NotImplementedException{} // RETURN "" /// -- todo -- /// - +[FoxProFunction("SETFLDSTATE", FoxFunctionCategory.CursorAndTable, FoxEngine.WorkArea, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION SetFldState( uField, nFieldState , uArea) AS LOGIC THROW NotImplementedException{} // RETURN FALSE /// -- todo -- /// - +[FoxProFunction("SETRESULTSET", FoxFunctionCategory.SQL, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION SetResultSet( uArea ) AS LONG THROW NotImplementedException{} // RETURN 0 diff --git a/src/Runtime/XSharp.VFP/ToDo-TUVWX.prg b/src/Runtime/XSharp.VFP/ToDo-TUVWX.prg index 487ff9a726..601b4dffb2 100644 --- a/src/Runtime/XSharp.VFP/ToDo-TUVWX.prg +++ b/src/Runtime/XSharp.VFP/ToDo-TUVWX.prg @@ -7,34 +7,29 @@ /// -- todo -- /// - +[FoxProFunction("TABLEREVERT", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION TableRevert( lAllRows , uArea) AS LONG THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("TABLEUPDATE", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION TableUpdate( nRows , lForce , uArea , cErrorArray) AS LOGIC THROW NotImplementedException{} // RETURN FALSE - - - - - /// -- todo -- /// - +[FoxProFunction("TXNLEVEL", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION TxnLevel( ) AS LONG THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("TXTWIDTH", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION TxtWidth( cExpression , cFontName, nFontSize , cFontStyle) AS FLOAT THROW NotImplementedException{} // RETURN 0 @@ -43,14 +38,14 @@ FUNCTION TxtWidth( cExpression , cFontName, nFontSize , cFontStyle) AS FLOAT /// -- todo -- /// - +[FoxProFunction("XMLTOCURSOR", FoxFunctionCategory.General, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.High)]; FUNCTION XmlToCursor( eExpression , cCursorName , nFlags ) AS LONG THROW NotImplementedException{} // RETURN 0 /// -- todo -- /// - +[FoxProFunction("XMLUPDATEFRAM", FoxFunctionCategory.General, FoxEngine.RuntimeCore, FoxFunctionStatus.Stub, FoxCriticality.Medium)]; FUNCTION XmlUpdatefram( cAliasList , nFlags , cSchemaLocation) AS STRING THROW NotImplementedException{} // RETURN "" diff --git a/src/Runtime/XSharp.VFP/Types/Attributes.prg b/src/Runtime/XSharp.VFP/Types/Attributes.prg new file mode 100644 index 0000000000..55a16f2c73 --- /dev/null +++ b/src/Runtime/XSharp.VFP/Types/Attributes.prg @@ -0,0 +1,105 @@ +USING System +USING System.Collections.Generic +USING System.Text + +BEGIN NAMESPACE XSharp.VFP + + /// + /// FoxPro engine + /// + PUBLIC ENUM FoxEngine + RuntimeCore := 0 + LanguageCore := 1 + WorkArea := 2 + DataSession := 3 + SQL := 4 + UI := 5 + Macro := 6 + NameResolution := 7 + Interop := 8 + END ENUM + + /// + /// Fox Functions Weight + /// + PUBLIC ENUM FoxCriticality + High := 3 + Medium := 2 + Low := 1 + END ENUM + + /// + /// FoxPro feature support level in X# + /// + PUBLIC ENUM FoxFunctionStatus + Full := 0 // Fully supported (same as VFP) + Partial := 1 // Partially supported (edge cases missed, flags or optional params) + Changed := 2 // Supported with changes (eg: requires .NET type or behavior differs by design) + Stub := 3 // Compiles but not functionally implemented + Obsolete := 4 // Obsolete (exists for retrocompatibility but it's usage is not recommended) + NotSupported := 5 // It won't be supported in X# (eg: Addls(), Bar(), COMArray(), etc) + END ENUM + + /// + /// Official functional categories of Visual FoxPro + /// + PUBLIC ENUM FoxFunctionCategory + Array := 0 + Bitwise := 1 + ClassAndObject := 2 + CursorAndTable := 3 + Database := 4 + DateAndTime := 5 + EnvironmentAndSystem := 6 + FileAndIO := 7 + Financial := 8 + MathAndNumeric := 9 + StringAndCharacter := 10 + SQL := 11 + UIAndWindow := 12 + General := 13 + END ENUM + + /// + /// Attribute to instrument the FoxPro dialect functions + /// vital for generating the compatibility metrics report via Reflection + /// + [AttributeUsage(AttributeTargets.Method, AllowMultiple := FALSE, Inherited := FALSE)]; + PUBLIC CLASS FoxProFunctionAttribute INHERIT Attribute + + PROPERTY Name AS STRING AUTO GET PRIVATE SET + PROPERTY Category AS FoxFunctionCategory AUTO GET PRIVATE SET + PROPERTY Engine AS FoxEngine AUTO GET PRIVATE SET + PROPERTY Status AS FoxFunctionStatus AUTO GET PRIVATE SET + PROPERTY Criticality AS FoxCriticality AUTO GET PRIVATE SET + PROPERTY Notes AS STRING AUTO GET PRIVATE SET + PROPERTY IntroducedVersion AS STRING AUTO GET PRIVATE SET + PROPERTY DeprecatedVersion AS STRING AUTO GET PRIVATE SET + + CONSTRUCTOR(; + cName AS STRING, ; + eCategory AS FoxFunctionCategory, ; + eEngine AS FoxEngine, ; + eStatus AS FoxFunctionStatus, ; + eCriticality AS FoxCriticality, ; + cNotes := "" AS STRING, ; + cIntroduced := "" AS STRING, ; + cDeprecated := "" AS STRING) + + SUPER() + + IF String.IsNullOrWhiteSpace(cName) + THROW ArgumentException{"Function name cannot be empty"} + ENDIF + + SELF:Name := cName + SELF:Category := eCategory + SELF:Engine := eEngine + SELF:Status := eStatus + SELF:Criticality := eCriticality + SELF:Notes := cNotes + SELF:IntroducedVersion := cIntroduced + SELF:DeprecatedVersion := cDeprecated + RETURN + END CLASS +END NAMESPACE diff --git a/src/Runtime/XSharp.VFP/UIFunctions.prg b/src/Runtime/XSharp.VFP/UIFunctions.prg index b6466b517c..808a7f9929 100644 --- a/src/Runtime/XSharp.VFP/UIFunctions.prg +++ b/src/Runtime/XSharp.VFP/UIFunctions.prg @@ -10,6 +10,7 @@ USING System.Windows.Forms /// +[FoxProFunction("MESSAGEBOX", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.High)]; FUNCTION MessageBox( eMessageText AS USUAL, nDialogBoxType := 0 AS LONG, cTitleBarText := "" AS STRING,nTimeOut := 0 AS LONG) AS LONG LOCAL cMessage AS STRING IF !IsString(eMessageText) @@ -39,6 +40,7 @@ FUNCTION MessageBox( eMessageText AS USUAL, nDialogBoxType := 0 AS LONG, cTitleB /// +[FoxProFunction("SYSMETRIC", FoxFunctionCategory.EnvironmentAndSystem, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION SysMetric( nScreenElement AS LONG) AS LONG SWITCH nScreenElement case 1 diff --git a/src/Runtime/XSharp.VFP/WindowFunctions.prg b/src/Runtime/XSharp.VFP/WindowFunctions.prg index c5c4a3b928..88ea90f5c4 100644 --- a/src/Runtime/XSharp.VFP/WindowFunctions.prg +++ b/src/Runtime/XSharp.VFP/WindowFunctions.prg @@ -13,6 +13,7 @@ DEFINE SW_NORMAL := 1 /// +[FoxProFunction("WVISIBLE", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION WVISIBLE( windowName AS STRING ) AS LOGIC VAR hwnd := FindWindow(null, (STRING)windowName) IF ( hwnd != NULL) @@ -21,6 +22,7 @@ FUNCTION WVISIBLE( windowName AS STRING ) AS LOGIC RETURN FALSE /// +[FoxProFunction("WEXIST", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Full, FoxCriticality.Medium)]; FUNCTION WEXIST( windowName AS STRING ) AS LOGIC VAR hwnd := FindWindow(null, (STRING)windowName) RETURN ( hwnd != NULL ) diff --git a/src/Runtime/XSharp.VFP/XSharp.VFP.xsproj b/src/Runtime/XSharp.VFP/XSharp.VFP.xsproj index cb65a48c39..e6f2735f11 100644 --- a/src/Runtime/XSharp.VFP/XSharp.VFP.xsproj +++ b/src/Runtime/XSharp.VFP/XSharp.VFP.xsproj @@ -110,6 +110,7 @@ + @@ -127,6 +128,7 @@ + diff --git a/src/Tools/VfpTools/VfpCompatMetrics/Program.prg b/src/Tools/VfpTools/VfpCompatMetrics/Program.prg new file mode 100644 index 0000000000..7782d8c82e --- /dev/null +++ b/src/Tools/VfpTools/VfpCompatMetrics/Program.prg @@ -0,0 +1,301 @@ + +USING System +USING System.IO +USING System.Reflection +USING System.Collections.Generic +USING System.Linq +USING System.Text + + +BEGIN NAMESPACE VfpCompatMetrics + // ======================================================= + // 1. Data Models + // ======================================================= + CLASS FoxFunctionMetadata + PROPERTY Name AS STRING AUTO + PROPERTY Category AS STRING AUTO + PROPERTY Engine AS STRING AUTO + PROPERTY Status AS STRING AUTO + PROPERTY Criticality AS STRING AUTO + PROPERTY Notes AS STRING AUTO + PROPERTY MethodName AS STRING AUTO + END CLASS + + CLASS ValidationIssue + PROPERTY Level AS STRING AUTO // "ERROR", "WARNING", "ALERT" + PROPERTY FunctionName AS STRING AUTO + PROPERTY Message AS STRING AUTO + END CLASS + + // ======================================================= + // 2. Assembly Loader + // ======================================================= + CLASS AssemblyLoader + STATIC METHOD Load(assemblyPath AS STRING) AS Assembly + IF !File.Exists(assemblyPath) + THROW FileNotFoundException{"The assembly file was not found in the specified path", assemblyPath} + ENDIF + + RETURN Assembly.LoadFrom(assemblyPath) + END METHOD + END CLASS + + // ======================================================= + // 3. Metadata extractor + // ======================================================= + CLASS MetadataExtractor + STATIC METHOD Extract(asm AS Assembly) AS List + VAR results := List{} + LOCAL types AS Type[] + + TRY + types := asm:GetTypes() + CATCH ex AS ReflectionTypeLoadException + VAR validTypes := List{} + FOREACH t AS Type IN ex:Types + IF t != NULL + validTypes:Add(t) + ENDIF + NEXT + types := validTypes:ToArray() + END TRY + + FOREACH @@type AS Type IN types + LOCAL methods AS MethodInfo[] + TRY + methods := @@type:GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance) + CATCH + LOOP + END TRY + + FOREACH @@method AS MethodInfo IN methods + VAR attributes := @@method:GetCustomAttributes(FALSE) + + FOREACH attr AS OBJECT IN attributes + VAR attrType := attr:GetType() + + IF attrType:Name == "FoxProFunctionAttribute" + VAR meta := FoxFunctionMetadata{} + meta:MethodName := @@method:Name + + meta:Name := GetPropString(attr, attrType, "Name") + meta:Category := GetPropString(attr, attrType, "Category") + meta:Engine := GetPropString(attr, attrType, "Engine") + meta:Status := GetPropString(attr, attrType, "Status") + meta:Criticality := GetPropString(attr, attrType, "Criticality") + meta:Notes := GetPropString(attr, attrType, "Notes") + + results:Add(meta) + EXIT // just 1 attribute per function + ENDIF + NEXT + NEXT + NEXT + RETURN results + END METHOD + + PRIVATE STATIC METHOD GetPropString(@@instance AS OBJECT, @@type AS Type, propName AS STRING) AS STRING + VAR prop := @@type:GetProperty(propName) + IF prop != NULL + VAR val := prop:GetValue(@@instance) + IF val != NULL + RETURN val:ToString() + ENDIF + ENDIF + + RETURN "" + END METHOD + END CLASS + + // ======================================================= + // 4. Validation engine + // ======================================================= + CLASS ValidationEngine + STATIC METHOD Validate(data AS List) AS List + VAR issues := List{} + VAR nameSet := HashSet{} + + FOREACH item AS FoxFunctionMetadata IN data + // 1. Empty name + IF String.IsNullOrWhiteSpace(item:Name) + issues:Add(ValidationIssue{}{ Level := "ERROR", FunctionName := "", Message := "Unnamed attribute in the technical method: " + item:MethodName }) + ELSE + // 2. Duplicated names + VAR upperName := item:Name:ToUpper() + IF nameSet:Contains(upperName) + issues:Add(ValidationIssue{}{ Level := "ERROR", FunctionName := item:Name, Message := "Duplicated function name. More than 1 overload was decorated." }) + ELSE + nameSet:Add(upperName) + ENDIF + ENDIF + + // 3. Simple warning: marked as "Full" but with notes/limitations + IF item:Status == "Full" && !String.IsNullOrWhiteSpace(item:Notes) + issues:Add(ValidationIssue{}{ Level := "WARNING", FunctionName := item:Name, Message := "State is 'Full' but contains limitation notes." }) + ENDIF + + // 4. Critical alert: High Criticality but is a Stub + IF item:Criticality == "High" && item:Status == "Stub" + issues:Add(ValidationIssue{}{ Level := "ALERT", FunctionName := item:Name, Message := "CRITICAL TECHNICAL DEBT: Essential function marked only as Stub"}) + ENDIF + NEXT + + RETURN issues + END METHOD + END CLASS + + // ========================================================================= + // 5. Metrics Engine + // ========================================================================= + CLASS MetricsEngine + PROPERTY TotalFunctions AS INT AUTO + PROPERTY StatusCounts AS Dictionary AUTO + PROPERTY EngineCounts AS Dictionary AUTO + PROPERTY CategoryCounts AS Dictionary AUTO + PROPERTY CompatibilityScore AS REAL8 AUTO + + CONSTRUCTOR(data AS List) + SELF:StatusCounts := Dictionary{} + SELF:EngineCounts := Dictionary{} + SELF:CategoryCounts := Dictionary{} + SELF:TotalFunctions := data:Count + + LOCAL totalWeight := 0.0 AS REAL8 + LOCAL earnedWeight := 0.0 AS REAL8 + + FOREACH item AS FoxFunctionMetadata IN data + SELF:IncrementDict(SELF:StatusCounts, item:Status) + SELF:IncrementDict(SELF:EngineCounts, item:Engine) + SELF:IncrementDict(SELF:CategoryCounts, item:Category) + + VAR cWeight := SELF:GetCriticalityWeight(item:Criticality) + VAR sWeight := SELF:GetStatusWeight(item:Status) + + totalWeight += (1.0 * cWeight) + earnedWeight += (sWeight * cWeight) + NEXT + + IF totalWeight > 0.0 + SELF:CompatibilityScore := earnedWeight / totalWeight + ELSE + SELF:CompatibilityScore := 0.0 + ENDIF + END CONSTRUCTOR + + PRIVATE METHOD IncrementDict(dict AS Dictionary, key AS STRING) AS VOID + VAR safeKey := IIF(String.IsNullOrWhiteSpace(key), "Unspecified", key) + + IF dict:ContainsKey(safeKey) + dict[safeKey] := dict[safeKey] + 1 + ELSE + dict:Add(safeKey, 1) + ENDIF + END METHOD + + PRIVATE METHOD GetStatusWeight(@@status AS STRING) AS REAL8 + DO CASE + CASE @@status == "Full"; RETURN 1.0 + CASE @@status == "Partial"; RETURN 0.75 + CASE @@status == "Changed"; RETURN 0.60 + CASE @@status == "Stub"; RETURN 0.30 + CASE @@status == "Obsolete"; RETURN 0.20 + CASE @@status == "NotSupported"; RETURN 0.0 + OTHERWISE; RETURN 0.0 + END CASE + END METHOD + + PRIVATE METHOD GetCriticalityWeight(crit AS STRING) AS REAL8 + DO CASE + CASE crit == "High"; RETURN 3.0 + CASE crit == "Medium"; RETURN 2.0 + CASE crit == "Low"; RETURN 1.0 + OTHERWISE; RETURN 1.0 // base weight by default + END CASE + END METHOD + END CLASS + + // ========================================================================= + // 6. Report printer + // ========================================================================= + CLASS ReportPrinter + STATIC METHOD Print(metrics AS MetricsEngine, issues AS List) AS VOID + Console.WriteLine("=============================================") + Console.WriteLine(" VISUAL FOXPRO COMPATIBILITY REPORT ") + Console.WriteLine("=============================================") + Console.WriteLine(String.Format("Total Instrumented Functions: {0}", metrics:TotalFunctions)) + + Console.WriteLine(String.Format("Weighted Compatibility Score: {0:P2}", metrics:CompatibilityScore)) + Console.WriteLine("--------------------------------------------------") + + Console.WriteLine(">>> DISTRIBUTION BY STATUS:") + FOREACH kvp AS KeyValuePair IN metrics:StatusCounts:OrderByDescending({ x => x:Value }) + Console.WriteLine(String.Format(" - {0, -15}: {1}", kvp:Key, kvp:Value)) + NEXT + Console.WriteLine("--------------------------------------------------") + + Console.WriteLine(">>> DISTRIBUTION BY ENGINE:") + FOREACH kvp AS KeyValuePair IN metrics:EngineCounts:OrderByDescending({ x => x:Value }) + Console.WriteLine(String.Format(" - {0, -15}: {1}", kvp:Key, kvp:Value)) + NEXT + Console.WriteLine("--------------------------------------------------") + + IF issues:Count > 0 + Console.WriteLine(">>> CONSISTENCY PROBLEMS DETECTED (" + issues:Count:ToString() + "):") + FOREACH issue AS ValidationIssue IN issues + LOCAL color := ConsoleColor.Yellow AS ConsoleColor + IF issue:Level == "ERROR"; color := ConsoleColor.Red; ENDIF + IF issue:Level == "ALERT"; color := ConsoleColor.Magenta; ENDIF + IF issue:Level == "WARNING"; color := ConsoleColor.Yellow; ENDIF + + Console.ForegroundColor := color + Console.WriteLine(String.Format(" [{0}] {1}: {2}", issue:Level, issue:FunctionName, issue:Message)) + Console.ResetColor() + NEXT + ELSE + Console.ForegroundColor := ConsoleColor.Green + Console.WriteLine(">>> No consistency problems were found") + Console.ResetColor() + ENDIF + Console.WriteLine("=============================================") + END METHOD + END CLASS + + // ========================================================================= + // 7. CLI entry point + // ========================================================================= + CLASS Program + STATIC METHOD Start(args AS STRING[]) AS INT + IF args:Length == 0 + Console.WriteLine("Usage: vfpCompatMetrics ") + RETURN 1 + ENDIF + + VAR asmPath := args[0] + + TRY + Console.WriteLine("Loading assembly for analysis: " + asmPath) + VAR asm := AssemblyLoader.Load(asmPath) + + Console.WriteLine("Extracting metadata based on attributes...") + VAR metadataList := MetadataExtractor.Extract(asm) + + Console.WriteLine("Analyzing metrics and consistency...") + VAR metrics := MetricsEngine{metadataList} + VAR issues := ValidationEngine.Validate(metadataList) + + Console.Clear() + ReportPrinter.Print(metrics, issues) + + CATCH ex AS Exception + Console.ForegroundColor := ConsoleColor.Red + Console.WriteLine("Fatal error during analysis:") + Console.WriteLine(ex:Message) + Console.ResetColor() + RETURN -1 + END TRY + + + RETURN 0 + END METHOD + END CLASS +END NAMESPACE diff --git a/src/Tools/VfpTools/VfpCompatMetrics/Properties/AssemblyInfo.prg b/src/Tools/VfpTools/VfpCompatMetrics/Properties/AssemblyInfo.prg new file mode 100644 index 0000000000..2224437ba4 --- /dev/null +++ b/src/Tools/VfpTools/VfpCompatMetrics/Properties/AssemblyInfo.prg @@ -0,0 +1,37 @@ +USING System.Reflection +USING System.Runtime.CompilerServices +USING System.Runtime.InteropServices +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("VfpTools")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("VfpTools")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(FALSE)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e3bdfa61-2018-4dd7-8a02-c053bb73ede2")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] diff --git a/src/Tools/VfpTools/VfpCompatMetrics/VfpCompatMetrics.xsproj b/src/Tools/VfpTools/VfpCompatMetrics/VfpCompatMetrics.xsproj new file mode 100644 index 0000000000..430dd7ecc3 --- /dev/null +++ b/src/Tools/VfpTools/VfpCompatMetrics/VfpCompatMetrics.xsproj @@ -0,0 +1,60 @@ + + + + + e3bdfa61-2018-4dd7-8a02-c053bb73ede2 + Exe + VfpCompatMetrics + VfpCompatMetrics + v4.6 + VfpCompatMetrics + VfpCompatMetrics.Program + Core + True + True + VfpTools + True + True + True + True + True + + + AnyCPU + False + + + AnyCPU + + + + + + + + + + + + + + Code + + + Code + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Tools/VfpTools/XSharp.Vfp.Tools.slnx b/src/Tools/VfpTools/XSharp.Vfp.Tools.slnx new file mode 100644 index 0000000000..5f57ebcbcd --- /dev/null +++ b/src/Tools/VfpTools/XSharp.Vfp.Tools.slnx @@ -0,0 +1,3 @@ + + +