Re: Printing to stout inside a Squeak plugin class
Posted by
Robert Withers-2 on
Jun 17, 2021; 6:55pm
URL: https://forum.world.st/Printing-to-stout-inside-a-Squeak-plugin-class-tp5130413p5130484.html
Thanks Levente! Never used this method before, but it looks promising. I
will try after I get my TNC power supply working: digital packet network
over ham radio. I am building it out.
---
Kindly,
Robert
On 6/17/21 1:14 PM, Levente Uzonyi wrote:
> Hi Robert,
>
> On Tue, 15 Jun 2021, Robert wrote:
>
>> I wish to print some debugging info to stdout when calling a primitive. How can I do this in Squeak primitive code?
> I think currently your only option is to use the #cCode: method. Something
> like this:
>
> | variableToPrint |
> <var: #variableToPrint type: #'unsigned int'>
> variableToPrint := 10.
> self cCode: 'printf("variableToPrint''s value is %u\n", variableToPrint)'
>
>
> Levente