June 12, 2003
"Ignacio Vazquez" <Ignacio_member@pathlink.com> wrote in message bc8117$2q5p$1@digitaldaemon.com
> In article <bb8bbe$2cbs$1@digitaldaemon.com>, Ilya Minkov says...
>>>> Lightweight objects
>>> Yes (deprecated).
>>
>>The turbo pascal ones? I don't even know how they work. Is it that terrible kludge that mimics C++ in a most inappropriate manner?
>
> No, records.

No, objects.  The "object" was deprecated in favour of "class".

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


June 12, 2003
"Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message 3EE87BEC.43A521B4@uk.renaultf1.com
> Ignacio Vazquez wrote:

[...]

>> [Delphi] can generate both C and C++ .obj files, as well as C DLLs/SOs.
>
> Not quite: Delphi does NOT generate C++ .obj files, only 'C' although these do conform to whatever the prevalant standard is.  [I am a C++ guy, not C, so can't remember the name of the format]

Not true.  Start a project in Delphi and go to Project > Options... > Linker.  You get three options for linker output, "Generate DCUs", "Generate C object files" and "Generate C++ object files".

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


June 12, 2003
"Walter" <walter@digitalmars.com> wrote in message news:bc82pf$2s1v$1@digitaldaemon.com...
>
> "Ignacio Vazquez" <Ignacio_member@pathlink.com> wrote in message news:bc8117$2q5p$1@digitaldaemon.com...
> > PS, is there an free NNTP server anywhere that hosts this newsgroup? I
> don't
> > want to have to go through this web interface...
>
> I access it using Outlook Express as news.digitalmars.com

Ah yes, figured it out.

Thanks,
  Ignacio


June 12, 2003
"Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message news:3EE87BEC.43A521B4@uk.renaultf1.com...
> Ignacio Vazquez wrote:
> > >The turbo pascal ones? I don't even know how they work. Is it that terrible kludge that mimics C++ in a most inappropriate manner?
>
> > No, records.
>
> Records are not objects though, as they do not support member
> fucntions/methods.
> The deprecated OP objects do count, though, I think.  [Perhaps a
> 'depracated' flag to further complicate the table!!]

The thing about 'object' is that it's the same as 'class', the only difference being that it instantiates in the stack instead of the heap and doesn't support dynamic functions.

OTOH, records can contain function and procedure variable types, they just don't have a 'self' to them.

Cheers,
  Ignacio


June 12, 2003
"Sebastian Moleski" <s.moleski@tcu.edu> wrote in message news:bbe6hc$29g$1@digitaldaemon.com...
> "William Meyer" <bill_meyer@earthlink.net> wrote in message
> news:bbe6ed$27l$1@digitaldaemon.com...
> oN 30-May-03, Alisdair Meredith said:
>
> > > I remember using it in Delphi2, not sure about Delphi 1
>
> > You're right -- it surfaced in D2.
>
> Huh? Am I blind? I have Delphi 7 and there's no return statement to be
seen.
> Any pointers?

There isn't one. The traditional way to return a value from a function in Pascal was to assign it to the functoin name.

Cheers,
  Ignacio


June 12, 2003
DRS wrote:

> Not true.  Start a project in Delphi and go to Project > Options... > Linker.  You get three options for linker output, "Generate DCUs", "Generate C object files" and "Generate C++ object files".

I guess that's what I get for posting without checking against the latest version <g>

Do you have any references I can look this up on? [Other than the
manuals]
While it makes sense to create standard 'C' .objs (where I believe there
ARE standards) what does it mean to create C++ .objs?  Which C++ linkers
do they work with?

The .obj format is very non-portable in the C++ world, although I beleive there are efforts under way on Linux to agree a common binary model.

-- 
AlisdairM
June 12, 2003
"Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message 3EE8D502.ADAB4392@uk.renaultf1.com
> DRS wrote:
>
>> Not true.  Start a project in Delphi and go to Project > Options... > Linker.  You get three options for linker output, "Generate DCUs", "Generate C object files" and "Generate C++ object files".
>
> I guess that's what I get for posting without checking against the latest version <g>
>
> Do you have any references I can look this up on? [Other than the manuals]

What's wrong with the help files?

> While it makes sense to create standard 'C' .objs (where I believe there ARE standards) what does it mean to create C++ .objs?  Which C++ linkers do they work with?

From the D6 help files:

-Generate DCUs: Output standard Delphi DCU format files.
-Generate C object files: Create a C object file for linking with a C
program (no name mangling).
-Generate C++ object files: Create a C++ object file for linking with
C++Builder (uses C++ name mangling).

Choosing to generate C++ object files activates two other options:

-Include namespaces: Puts information into namespaces and mangles the
namespace (the name of the unit) into the symbol. This must be checked if
sharing code with C++Builder. (This option is enabled if Generate C++Object
files is checked.)
-Export all symbols: Creates DLL exports for exported functions in the
project. It is for use when generating OBJs for packages that will be linked
into C++Builder applications. (This option is enabled if Generate C++Object
files is checked.)

Don't ask me what it all means.  I don't do C++.

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


June 13, 2003
DRS wrote:
> "Ignacio Vazquez" <Ignacio_member@pathlink.com> wrote in message
> bc8117$2q5p$1@digitaldaemon.com
> 
>>In article <bb8bbe$2cbs$1@digitaldaemon.com>, Ilya Minkov says...
>>
>>>>>Lightweight objects
>>>>
>>>>Yes (deprecated).
>>>
>>>The turbo pascal ones? I don't even know how they work. Is it that
>>>terrible kludge that mimics C++ in a most inappropriate manner?
>>
>>No, records.
> 
> 
> No, objects.  The "object" was deprecated in favour of "class".

Records *can* be considered "lightweight object". Look at the left part of the table, it says C:YES, C++:YES, Java: NO (IIRC). And guess what's the only thing next to the objects is which C supports?

-i.

June 14, 2003
"Ilya Minkov" <webmaster@midiclub.de.vu> wrote in message bcdnsu$1ule$1@digitaldaemon.com

[...]

> Records *can* be considered "lightweight object". Look at the left part of the table, it says C:YES, C++:YES, Java: NO (IIRC). And guess what's the only thing next to the objects is which C supports?

Pascal records do not encapsulate both data and code; they do not have methods.  They therefore are not objects in any meaningful sense.  The deprecated "object" type is an object in the OO sense but inferior to the current "class" type.

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


June 14, 2003
DRS wrote:
> "Ilya Minkov" <webmaster@midiclub.de.vu> wrote in message
> bcdnsu$1ule$1@digitaldaemon.com
> 
> [...]
> 
> 
>>Records *can* be considered "lightweight object". Look at the left part
>>of the table, it says C:YES, C++:YES, Java: NO (IIRC). And guess what's
>>the only thing next to the objects is which C supports?
> 
> 
> Pascal records do not encapsulate both data and code; they do not have
> methods.  They therefore are not objects in any meaningful sense.  The
> deprecated "object" type is an object in the OO sense but inferior to the
> current "class" type.

Neither do C structs, but they obviously qualify.