29.03.2006, 13:56 | #1 |
Administrator
|
The X++ Print Statement (by Sharon E. Cannon)
Цитата:
Posted on 28-Mar-2006 at microsoft.public.axapta.programming by Sharon E. Cannon
When I'm writing a job to test something or to update some data, I know that I can use the PRINT command to print to the screen. But sometimes I'd like to print to a printer instead, so that I can keep a hard copy of what I've done. My background is Visual Basic, and I know that in VB I can just use Printer.Print But I've looked all through the Axapta developer's guide and the few X++ books that we have here, and I cannot find an equivalent command in X++. I'm sure that it's something simple, but I'm just not seeing it. The closest thing I've found is the ReportOutputUser class, but it seems to be designed for reports. Can anyone help me, please? Thanks! X++: int x = 1; real y = 2.55; ; info(strfmt("x = %1, y = %2", x, y)); // x = 1, y = 2.55 For more information on strfmt(), open AOT and go to System documentation/Functions/strfmt
__________________
Not registered yet? Register here! Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me |
|
06.04.2006, 13:06 | #2 |
Участник
|
Цитата:
Сообщение от Maxim Gorbunov
Try using the info() function instead of the print statement. There is a disadvantage - you only can output strings with this function. But there is the strfmt() function which can convert any data to string and format it accordingly. Take a look at my example:
X++: int x = 1; real y = 2.55; ; info(strfmt("x = %1, y = %2", x, y)); // x = 1, y = 2.55 For more information on strfmt(), open AOT and go to System documentation/Functions/strfmt But, info window has limit of rows no more 10 000 |
|
06.04.2006, 20:11 | #3 |
Участник
|
Цитата:
Сообщение от garu
But, info window has limit of rows no more 10 000
|
|
|
За это сообщение автора поблагодарили: ALEG (1). |
|
|