Running cas-show.

From: R. Clayton <rclayton_at_monmouth.edu>
Date: Mon, 24 Sep 2007 05:35:10 -0400
What is the correct way to use cas-show? I ran it from the terminal window
and it seemed to be waiting for data. I pasted data into the window with
the format on the assignment sheet (circles r x1 y1 ...), and tried to end
the input with CTRL-D

  That works, although it's easier to pipe the output of your program into
  cas-show:

    $ cas-sketch | your-program | cas-show
  
  If you're trying to debug your program, it's better to capture cas-sketch
  output in a file so you can give your program the same input:

    $ cas-sketch > sketch

    $ your-program < sketch | cas-show

but it just spat back: "Can't find the "nodes" marker."

  Make sure you're running the version that appears in the assignment
  directory.  If you make a copy, be sure to keep your copy up-to-date.  The
  easiest way to do that is with a makefile entry like

    cas-show: /export/home/class/cs-306/a1/cas-show
	      cp $< $@

  assuming you're using a makefile.  Even easier is to not make a copy at all
  by setting an alias:

    $ cas-show < /dev/null
    bash: cas-show: command not found

    $ alias cas-show=/export/home/class/cs-306/a1/cas-show

    $ alias cas-show
    alias cas-show='/export/home/class/cs-306/a1/cas-show'

    $ cas-show < /dev/null
    ^c

    $ 

  How you set the alias depends on your shell; this example is for bash.  See
  your shell's man page for details.  Setting an alias only works if you're on
  a system that can access the assignment directory. Or you can put the
  assignment directory in your PATH:

    $ cas-show < /dev/null
    bash: cas-show: command not found

    $ PATH=$PATH:/export/home/class/cs-306/a1

    $ cas-show < /dev/null
    ^c

    $

  How you add to PATH depends on your shell; this example's for bash.  See your
  shell's man page for details.  Adding to PATH only works if you're on a
  system that can access the assignment directory.
Received on Mon Sep 24 2007 - 05:35:44 EDT

This archive was generated by hypermail 2.2.0 : Fri Oct 12 2007 - 16:54:31 EDT