On Fri, Feb 10, 2012 at 1:56 AM, CLIPS Support <garydri
...@gmail.com> wrote:
> If you write all of the values to a single line, you can read the
> entire line using the deadline function and convert it to a multifield
> value using the explode$ function.
> CLIPS> (open "data.txt" data "w")
> TRUE
> CLIPS> (printout data "1 2 3 4 5 6 7 8 9 10" crlf)
> CLIPS> (close data)
> TRUE
> CLIPS> (open "data.txt" data)
> TRUE
> CLIPS> (explode$ (readline data))
> (1 2 3 4 5 6 7 8 9 10)
> CLIPS> (close data)
> TRUE
> CLIPS>
> On Feb 6, 12:15 am, raninder dhillon <raninderdhil...@gmail.com>
> wrote:
> > hello..
> > I am facing some problem using CLIPS software. Actually i am making
> > some project in CLIPS which will read values from a text file , apply
> > rules on that values and store result in another text file. I am
> > using .bat file to read values,and loading .clp file for rules. The
> > problem is read-number function reads one value at a time. to read 10
> > values, i want to make use of loop
> > (open "ex.txt" num "r")
> > (bind ?count 0)
> > (while (<= ?count 9)
> > (bind ?ans(read-number num))
> > now ?ans stores one value,and next time when count becomes 1,it reads
> > another value such that previous value of ?ans get overwritten. I dont
> > want to use statement (bind ?ans(read-number num) 10 times... i want
> > to use ans as an array variable,so that all 10 values get stored on
> > which i can further apply rules. but i am unable to find array option
> > in CLIPS. can you help me how to do this?
> --
> You received this message because you are subscribed to the Google Groups
> "CLIPSESG" group.
> To post to this group, send email to CLIPSESG@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/CLIPSESG?hl=en
> --> IF YOU NO LONGER WANT TO RECEIVE EMAIL <--
> Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
> Click on "Edit my membership" link.
> Select the "No Email" radio button.
> Click the "Save these settings" button.
> --> IF YOU WANT TO UNSUBSCRIBE <--
> Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
> Sign in
> Click on "Edit my membership" link.
> Click the "Unsubscribe" button.
> Note: This appears to be the most reliable way to unsubscribe
> Alternately, send email to CLIPSESG-unsubscribe@googlegroups.com. You
> will receive an email which you must respond to as well to unsubscribe.
> Clicking the link mentioned in the unsubscribe reply does not appear to
> work reliably.