HP3000-L Archives

June 2004, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 24 Jun 2004 10:20:50 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
Hi, I am writing a small script that reads a number from a file, increments
it with one and writes it back to the file.
If i write this as a sequence of commands in the shell

setvar count 0
input count <myfile
setvar count !count+1
echo !count >myfile

it works. If, however I put it in a file and run the file i get:
Variable name not found in variable table. (CIWARN 8101)

if i do a setvar count 0 from the prompt and then run the script i get
Unexpected character found in number. (CIERR 9810)

why doesnt it create the variable when i do the setsvar count 0 on the
first line of the script?!
how do i make the count+1 work? i tried limiting it to one digit by doing
setvar count ord('incount')-ord('0')+1  but that didnt work out.

anybody?

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2