test12 376 B

1234567891011121314151617181920212223
  1. #!/usr/bin/perl
  2. #
  3. use strict;
  4. use warnings;
  5. use lib "..";
  6. use Tpl;
  7. my $pwd = `pwd`;
  8. chomp $pwd;
  9. my $tmp1 = "$pwd/$0_1.out";
  10. my $i;
  11. my $tpl = Tpl->tpl_map("A(f)",\$i);
  12. for($i=0; $i<10.0; $i+=2/3.0) { $tpl->tpl_pack(1); }
  13. $tpl->tpl_dump($tmp1);
  14. my $j;
  15. my $tpl2 = Tpl->tpl_map("A(f)",\$j);
  16. $tpl2->tpl_load($tmp1);
  17. while($tpl2->tpl_unpack(1) > 0) { printf("%.6f\n", $j); }