Re: PART EIGHT - A D4D PRIMER - CONVERTING DCAL to D4D CODE
Posted:
Wed May 30, 2018 12:28 am
by dhs
There was an error in the Replace macro code I posted earlier. You can download the correct version in my Shortcuts.xml file from my web site at . There are brief instructions and description of each macro on the page at
I may update this file or add new macros from time to time, so it is easier to provide the above link than to keep posting the source here!
Best Regards,
David H
Re: PART EIGHT - A D4D PRIMER - CONVERTING DCAL to D4D CODE
Posted:
Mon Mar 25, 2019 2:15 pm
by dhs
I would also suggest getting rid of any of the DCAL routines that concert numbers to/from strings. They are replicated in D4D, but the D4D versions still appear to use single precision arithmetic (e.g. cvrllst (9.123456789, s) will result in s being '9.1234570').
Delphi provides its own methods for converting between numbers and strings, so use these instead (you will need to change your code slightly to catch exceptions when a string is not a valid number (instead of checking the true/false result of the DCAL string to number functions) .