BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi function to a Builder equivilant

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Daryl
Guest





PostPosted: Sun Feb 12, 2006 6:03 am    Post subject: Delphi function to a Builder equivilant Reply with quote



I am interested in converting a Delphi class to C++ class.

Could someone please give me equivalents to:

1) Buffer[0] == Chr( I-1 )

2) Inc( I );

3) Dec( TopXPixels, GutterLeft );

4) Buffer = Format( PageNumber.Text, [Printer.PageNumber] );

thanks
daryl
Back to top
HF
Guest





PostPosted: Sun Feb 12, 2006 10:03 am    Post subject: Re: Delphi function to a Builder equivilant Reply with quote



Quote:
4) Buffer = Format( PageNumber.Text, [Printer.PageNumber] );

Put
#include <Printers.hpp>

TPrinter *MyPrinter = Printer();
String Buffer = Format( "PageNumber :
%d",ARRAYOFCONST(((int)MyPrinter->PageNumber)) );
Back to top
HF
Guest





PostPosted: Sun Feb 12, 2006 10:03 am    Post subject: Re: Delphi function to a Builder equivilant Reply with quote



Quote:
1) Buffer[0] = = Chr( I-1 )
Buffer[0] = I-1; // for assignment .Double = = doesn't exist in Pascal

2) Inc( I );
I++;


Quote:
3) Dec( TopXPixels, GutterLeft );
TopXPixels -= GutterLeft; // this is - =

4) Buffer = Format( PageNumber.Text, [Printer.PageNumber] );
String Buffer = Format( "PageNumber : %d",

ARRAYOFCONST(((int)Printer()->PageNumber)) );

-minas
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Feb 13, 2006 8:03 am    Post subject: Re: Delphi function to a Builder equivilant Reply with quote

"Daryl" <developeracc (AT) hotmail (DOT) com> wrote in message
news:43eec2c0 (AT) newsgroups (DOT) borland.com...

Quote:
Could someone please give me equivalents to:

1) Buffer[0] == Chr( I-1 )

Buffer[0] = (char) (i-1)

Or simply (depending on what Buffer[] and I are actually declared as):

Buffer[0] = (i-1);

Quote:
2) Inc( I );

++I;

Quote:
3) Dec( TopXPixels, GutterLeft );

TopXPixels -= GutterLeft;

Quote:
4) Buffer = Format( PageNumber.Text, [Printer.PageNumber] );

Buffer = Format(PageNumber->Text,
ARRAYOFCONST((Printer()->PageNumber)));


Gambit
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.