Hi Seyed,

Simple enough... try this:

;;--------------------------------------
;; prnt.clp
;;--------------------------------------
(printout t "Enter first name: ")
(bind ?first-name (read))
(printout t "Enter last name: ")
(bind ?last-name (read))
(bind ?full-name (str-cat ?first-name " " ?last-name))
(printout t "Hello, " ?full-name crlf)
;;--------------------------------------


Jess will print out...

Jess, the Rule Engine for the Java Platform
Copyright (C) 2006 Sandia Corporation
Jess Version 7.0p2 10/21/2007

Jess> (batch prnt.clp)
Enter first name: Jason
Enter last name: Morris
Hello, Jason Morris
Jess>


Cheers,
Jason

-----------------------------------------------------------
Morris Technical Solutions LLC
[EMAIL PROTECTED]
(517) 304-5883

On 6/11/08, seyed hossein <[EMAIL PROTECTED]> wrote:
> Hi,
> could anyone give me a simple example involving the (read) function. for
instance if I want to get the first name and last name of the user as input
and combine them as his full name and print it, how should I do it?
> thanks
>



--

Reply via email to