TIP: Click on subject to list as thread! ANSI
echo: aust_avtech
to: Bob Lawrence
from: andrew clarke
date: 2003-05-28 00:24:04
subject: Borland

Sun 2003-05-11 10:50, Bob Lawrence (3:712/610.12) wrote to Andrew Clarke:

 BL> It's not so much specifics as the general "feel" of the two
 BL> compilers. It's pretty obvious that Borland tricked up their Delphi
 BL> compiler and Visual Objects to do CBuilder... it's nothing like C++
 BL> 5.02 which is virtually *all* C.

The compilers themselves are really not much different.  Where Borland C++
5.02's BCC32 compiler was 5.02, Borland C++ Builder 3.0's compiler is
version 5.3.  The FreeCommandlineTools version from 2000 that you can
download off the web is 5.5.

With Borland C++ 3.1, 4.x and 5.0, if you wanted to write GUI apps you had
to either use the C++ ObjectWindows Library (OWL) or use direct Win32 API
calls.  In C++ Builder the OWL was abandoned in favour of the VCL, but you
can still write programs with it that don't make use of the VCL or require
it in any way, ie. console programs where the entry point is main(), or GUI
applications where the entry point is WinMain().

Also, I seem to recall there being an open source clone of the OWL that
could be used with recent versions of Borland C++ and some other compilers.
 So there's really no reason why you can't use recent versions of BC++ to
compile BC++ 5.0 programs.

 BL> It's obvious that everyone at Borland *knows* that Pascal makes
 BL> more sense, but in locking themselves into Windows, they are forced
 BL> to adapt to C anyway. The result is that Borland is losing the
 BL> plot. 

I don't think this has anything to do with being "locked into
Windows" at all.

More likely it's Pascal/Delphi programmers wanting more of C's features,
eg. Borland introduced null-terminated strings in Turbo Pascal 6.0 (or
7.0?) while C had them from its inception.  Without them, Pascal strings
were limited to 255 characters in length.  AnsiString was provided to solve
other problems...

 BL> Really, what I'm doing now is marking time, waiting for someone to
 BL> write a proper VisualC Compiler for Linux. My other alternative is
 BL> to make the same move that I made for Win31... swap to Delphi and
 BL> for Linux, buy myself Kylix,

Kylix Open Edition 3.0 is on first CD that comes with the June 2003 issue
of Australian Personal Computer magazine.

 BL> but I suspect that Pascal is a lost cause anyway... slowly turning 
 BL> C and vice versa.

Best of both worlds, really.

 BL> As for a specific question... (and thank you for the offer) 

 BL> In an AnsiString, can I treat it like a Pascal string, and use a
 BL> char* pointer to an element... then use the old C functions like
 BL> strstr(), strcomp(), strncomp(), etc?

You can use the c_str() method to convert it to a C string.

#include 
#include 
#include 

int main(void)
{
    AnsiString as;
    char *p;

    as = "Hello world.";
    p = strstr(as.c_str(), "world");
    printf("%s\n", p);

    return 0;
}

1:04 voodoo [e:\devel\cpp\ansistring]bcc32 test.cpp vcl.lib
Borland C++ 5.3 for Win32 Copyright (c) 1993, 1998 Borland International
test.cpp:
Turbo Incremental Link 3.0 Copyright (c) 1997, 1998 Borland International

1:04 voodoo [e:\devel\cpp\ansistring]test.exe
world.

-- mail{at}ozzmosis.com

--- timEd/Cygwin 1.11.b1
* Origin: Blizzard of Ozz, Mt Eliza, Victoria, Australia (3:633/267.1)
SEEN-BY: 633/260 267 270
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.