The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,308 other followers

The Format function introduced in Delphi 1 was based on the FormatStr function in Turbo Vision available in Turbo Pascal 6 or higher

Posted by jpluimers on 2017/10/26

I did find my Borland Pascal 7.0.1 ISO which showed that https://github.com/romiras/turbo-pascal-archive/blob/master/Files/Dos%20Navigator/FORMAT.ASM is identical to ./BP/RTL/TV/FORMAT.ASM which is used from ./BP/RTL/TV/DRIVERS.PAS to provide this:

{ String formatting routines }

{$L FORMAT.OBJ}

procedure FormatStr(var Result: String; const Format: String; var Params);external {FORMAT};

There are various examples like in ./BP/EXAMPLES/DOS/TVDEMO/ASCIITAB.PAS at line 143:

FormatStr(TempStr, ' Char: %c Decimal: %0# Hex: %0#x ', ASCIIChar);

So it was in the Drivers unit, but also easy to incorporate in your own unit by linking the .OBJ file and providing the external declaration in any unit.

The Drivers unit is very independent of the rest of Turbo Vision: it uses the Objects unit (which most projects use as the System unit at ~500 lines of code provided very little functionality by itself).

For the diskette based install, the .TPU files were on the standard disks and the sources for both RTL and Turbo Vision on separate disks, but anyone would install them as they provided a lot of insight. The CD-ROM has them all on the same medium (both as installers and unpacked in the BP directory).

I just checked Turbo Pascal 6.0 (that I did have a VM for) which has them in the same way.

Source: [WayBackWe’re discussing with the collegues: anybody knows when Format function was introduced in Delphi? – Klaus Edelmann – Google+

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: