Menu

#662 set print/table $datablock

Version 5
closed-accepted
None
5
2014-05-23
2014-03-09
No

Datablocks are one of the highlights of the upcoming version 5. This is a first patch which intends to extend their usefulness even further by using them as in-memory-data. This can help to avoid temporary files.

This patch implements set print $datablock [append], i.e. print output is not written to a file but to a in-memory datablock. The update to fitmulti.dem included in the patch demonstrates a possible use.

I intend to apply this idea to implement set table $datablock and fit parameter files. save/load commands for datablocks will complete this functionality.

These commands could also help to implement the idea of [patches:#427].

1 Attachments

Related

Patches: #427

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-03-22

    Maybe also useful to replace the current test_palette()?

     
  • Bastian Märkisch

    • status: open --> pending-accepted
    • Group: -->
     
  • Bastian Märkisch

    Patch now in CVS. I'll look into 'test palette' later.

     
  • Ethan Merritt

    Ethan Merritt - 2014-03-23

    I look forward to the "set table $FOO" extension. That strikes me as being the more important part.

    By the way - I originally implemented a routine to dump a datablock to a file but then I realized it is not necessary. "set print 'foo.dat'; print $FOO" already does this. I'm not certain whether a separate load command is needed. It may be that this will be handled by "set table $FOO; plot 'foo.dat' with table". That was not the original idea behind the "plot with table" patch but it might work for this.

     
  • Bastian Märkisch

    This patch implements set table $datablock. Comments appreciated.

     
    • Ethan Merritt

      Ethan Merritt - 2014-04-01

      from a log of valgrind run on vector.dem

      ==2715== Conditional jump or move depends on uninitialised value(s)
      ==2715== at 0xD9847AA: vfprintf (in /usr/lib64/libc-2.18.so)
      ==2715== by 0xD9ACAC8: vsnprintf (in /usr/lib64/libc-2.18.so)
      ==2715== by 0xD98A991: snprintf (in /usr/lib64/libc-2.18.so)
      ==2715== by 0x4C1AC6: print_3dtable (tabulate.c:458)
      ==2715== by 0x495AC1: plot3drequest (plot3d.c:2203)
      ==2715== by 0x4389E4: replotrequest (command.c:2347)
      ==2715== by 0x439A24: do_line (command.c:615)
      ==2715== by 0x4765F8: load_file (misc.c:376)
      ==2715== by 0x4288D2: main (plot.c:653)
      ==2715==

      ==2715== 19 bytes in 2 blocks are definitely lost in loss record 72 of 291
      ==2715== at 0x4C266ED: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==2715== by 0xD9BDCB9: strdup (in /usr/lib64/libc-2.18.so)
      ==2715== by 0x4ACC2B: set_command (set.c:4572)
      ==2715== by 0x439A24: do_line (command.c:615)
      ==2715== by 0x4765F8: load_file (misc.c:376)
      ==2715== by 0x4288D2: main (plot.c:653)
      ==2715==

       
  • Bastian Märkisch

    • summary: set print $datablock --> set print/table $datablock
    • assigned_to: Bastian Märkisch
     
  • Bastian Märkisch

    • status: pending-accepted --> closed-accepted
    • Group: --> Version 5
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.