Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Your information in this site is absolutely WONDERFUL. It is the most useful site on the web to me right now. Thank You Thank You..."

Geography

Where in the world do Tek-Tips members come from?

100% noob with a basic question regarding expressionsHelpful Member! 

schematizer (Programmer)
23 Jan 11 1:08
I'm trying to teach myself Scheme for a class.

A typical IF statement looks like this:

(if (condition) (if true) (if false))

My question is is it possible to execute two expressions if the condition is true?  Something like this:

(if (condition) ( (if true) (if true) ) (if false))

If the condition is true I want it to print a variable and then use recursion to run the if statement again.  As it is I can print the variable but then seem to have no other options.

Thanks!

 
Helpful Member!  joel76 (Programmer)
23 Jan 11 2:55

CODE

(if (condition)
   ( begin
       (if true)
       (if true) )
   (if false))
schematizer (Programmer)
23 Jan 11 12:55
Very simple and works perfectly!  Thank you

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close