Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Logo > Re: need help w...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 9 Topic 1544 of 1596
Post > Topic >>

Re: need help with numberp and memberp

by Andreas Micheler <Andreas.Micheler@[EMAIL PROTECTED] > Feb 1, 2008 at 02:46 AM

davidciccarello@[EMAIL PROTECTED]
 wrote:
> numberp :v iffalse [messagebox [error] [you need to use number(s) are
> your first digits]]
> numberp 1>:v>13 iftrue [messagebox [error] [your first 2 inputs must
> be numbers between 1 and 13]]

You forgot the "test"-instruction before numberp.
Also 1>:v>13 is probably not recognized by Logo,
except it's a very sly one. ;-)
You can write
	and (1 > :v) (:v > 13)
instead.
But this will only output a word, either "true or "false,
so it never will be a number, most possibly.

But you can also rewrite it using the "if" or "ifelse"
control structures,
which is a bit more modern than "test"+"iftrue"+"iffalse".

Cheers,
Andreas
 




 9 Posts in Topic:
need help with numberp and memberp
davidciccarello@[EMAIL PR  2008-01-31 17:29:27 
Re: need help with numberp and memberp
Andreas Micheler <Andr  2008-02-01 02:46:37 
Re: need help with numberp and memberp
davidciccarello@[EMAIL PR  2008-01-31 17:59:03 
Re: need help with numberp and memberp
winston19842005 <bjjly  2008-01-31 21:04:05 
Re: need help with numberp and memberp
davidciccarello@[EMAIL PR  2008-01-31 18:03:44 
Re: need help with numberp and memberp
davidciccarello@[EMAIL PR  2008-01-31 18:06:39 
Re: need help with numberp and memberp
winston19842005 <bjjly  2008-01-31 21:17:14 
Re: need help with numberp and memberp
davidciccarello@[EMAIL PR  2008-01-31 18:25:22 
Re: need help with numberp and memberp
bh@[EMAIL PROTECTED] (Br  2008-02-01 07:05:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:00:34 CDT 2008.