Kevin,
That will not be possible in X#. Just two curly braces is an empty literal array.
Robert
RAt() and ChrTran() functions
RAt() and ChrTran() functions
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
RAt() and ChrTran() functions
indeed, my FP-DOS results are:Kevin Clark wrote:FYI, in Foxpro you don't need the slashes for an empty date. The open and close curly brackets by themselves do the same thing.
Code: Select all
d = {}
? Dtoc ( d ) && " . . "
regards
Karl-Heinz
- Zdeněk Krejčí
- Posts: 19
- Joined: Wed Sep 04, 2019 8:07 am
RAt() and ChrTran() functions
In FP-DOS and also FVP works also {..}
Set date german
d={..} && empty date
Empty date is not null.
Set date german
d={..} && empty date
Empty date is not null.
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
RAt() and ChrTran() functions
@Robert/Chris
In the attachment there are two new functions.
When i pass a invalid date my localized FP-DOS doesn´t throw a exception but returns the german error text "*Ungültiges Datum*". Currently both functions return the hard coded text "*invalid date*". I think VFP needs, like VO, nation dependent resources where such error texts are stored.
A few days ago I opened a ticket about the current At() and AtC() behavior.
https://github.com/X-Sharp/XSharpPublic/issues/365
I added the mentioned changes and some At() and AtC() tests to the viaef.
regards
Karl-Heinz
In the attachment there are two new functions.
Code: Select all
FUNCTION MDY ( tExpression AS DateTime ) AS STRING
FUNCTION MDY ( dExpression AS DATE ) AS STRING
FUNCTION DMY ( tExpression AS DateTime ) AS STRING
FUNCTION DMY ( dExpression AS DATE ) AS STRING
A few days ago I opened a ticket about the current At() and AtC() behavior.
https://github.com/X-Sharp/XSharpPublic/issues/365
I added the mentioned changes and some At() and AtC() tests to the viaef.
regards
Karl-Heinz
- Attachments
-
[The extension viaef has been deactivated and can no longer be displayed.]
RAt() and ChrTran() functions
Hi Karl-Heinz,
Thanks a lot for the fixes!
I have now adjusted the XIDE project file for the runtime in Git, so you can now test your changes against the existing test suite, enter new tests in the necessary format with Asserts etc.
Can you please pull the latest changes, open Runtime.xiproj and see if everything compiles without errors (except for the MacroCompiler)? Then can you run the tests and see if they all pass (except for just a few related to dbfs currently)?
When you are set, please have a look at one of the tests in the project, for example DevRtRuntimeXSharp.VFP.TestsStringTests.prg, then you can create new ones in the same format, so they can be added directly to the suite.
Thanks a lot for the fixes!
I have now adjusted the XIDE project file for the runtime in Git, so you can now test your changes against the existing test suite, enter new tests in the necessary format with Asserts etc.
Can you please pull the latest changes, open Runtime.xiproj and see if everything compiles without errors (except for the MacroCompiler)? Then can you run the tests and see if they all pass (except for just a few related to dbfs currently)?
When you are set, please have a look at one of the tests in the project, for example DevRtRuntimeXSharp.VFP.TestsStringTests.prg, then you can create new ones in the same format, so they can be added directly to the suite.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu