Home  |  Linux  | Mysql  | PHP  | XML
From:Patrick Dupre Date:Sun Feb  7 23:08:15 2010
Subject:piddle in hash
Hello,

I have been unsuccessful in getting the piddle values when I store them
in a hash so, I am asking to the list.
This works OK:
test_pdl (array)
     pdl *array
   CODE:
     PDL -> converttype (&array, PDL_D, 1) ;

when I do: test_pdl ($piddle) ;


but when I do:
%hash {"A"} = $piddle ;
test_pdl (\%hash) ;

and
test_h (hash)
     HV *hash
     HE *he ;
     pdl *p_pdl ;
   CODE:
     if (hv_exists_ent (hash, "A", 0)) {
       he = hv_fetch_ent (hash, "A", 0, FALSE) ;
       if (he) {
         if (SvTYPE (HeVAL (he)) == SVt_RV) {
           p_pdl = (pdl*) newRV_inc (SvRV (HeVAL (he))) ;
or
 	  p_pdl = (pdl*) SvRV (HeVAL (he)) ;
 	  PDL -> converttype (&p_pdl, PDL_D, 1) ;
 	  }
         }
       }


What would the way of doing ?
Thank for your help.


---
==========================================================================
  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email: pd520@york.ac.uk
==========================================================================
Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: piddle in hash
PRINT statements in SQL and SQLDataReader
Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server
Re: SQL connect error -101188867
Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server


  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants