At 10:50 AM 08-09-2000 -0600, Nathan Torkington wrote:
>Hein Ragas writes:
>>   In example 3 of the perlxstut page, the "round" function, it is shown
>> that a constant can not be changed. That's fair enough -- but how can I
>> return a "fresh" value back to the calling Perl program? How would the code
>> of example 3 have to be modified to be able to do "$i = Mytest::round(4.5)"
>> in the test-program?
>>   I've looked around for this, but all I could find is the OUTPUT-keyword,
>> which does exactly the opposite.

>  int
>  round(n)
>    double n
>  CODE:
>    RETVAL = n+0.5;
>  OUTPUT:
>    RETVAL

  Now I've determined what was the problem. The input-parameter I get in my
function was a PV, and my output is an IV. Apparently these two can't mix,
which seems odd. I'm sure there must be a way to do it - but how?

Hein


Reply via email to