Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Sending packed arrays from Perl to C

by nardo (Friar)
on Aug 06, 2001 at 09:45 UTC ( #102397=note: print w/replies, xml ) Need Help??


in reply to Sending packed arrays from Perl to C

You use integers in getangles so pack them as integers.
# my $packedRow= pack("f$width", @$avRow); my $packedRow= pack("i$width", @$avRow);
You want to add each row to packedMatrix rather than overwrite it each time.
# $packedMatrix = pack("p", $packedRow); $packedMatrix .= pack("P", $packedRow);

With these changes the code works on my machine.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://102397]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-05-19 02:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?