Searching \ for 'nested if statements' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=nested+statements
Search entire site for: 'nested if statements'.

Truncated match.
PICList Thread
'nested if statements'
1999\08\04@135747 by Juimiin Hong

flavicon
face
Hi,

Do nested if statements exist?



ttul
me

1999\08\04@142022 by eplus1

flavicon
face
Yes

James Newton, webmaster http://get.to/techref
spam_OUTjamesnewtonTakeThisOuTspamgeocities.com <.....jamesnewtonKILLspamspam@spam@geocities.com>
1-619-652-0593 phoneÊ



-----Original Message-----
From: pic microcontroller discussion list
[PICLISTspamKILLspamMITVMA.MIT.EDU]On Behalf Of Juimiin Hong
Sent: Wednesday, August 04, 1999 10:56 AM
To: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
Subject: nested if statements


Hi,

Do nested if statements exist?



ttul
me

1999\08\04@143906 by Juimiin Hong

flavicon
face
> Yes

What is the format?

I've tried
if

else if

else

endif


and


if

elsif

else

endif


ttul
Juimiin

1999\08\04@145320 by Adam Davis

flavicon
face
We need more information than what you've given us.  What language and compiler
are you using?

PIC assembly does not contain if statements, never mind nested if.  It does
contain instructions to skip the next instruction based on a value or status...

-Adam

Juimiin Hong wrote:
>
> Hi,
>
> Do nested if statements exist?
>
> ttul
> me

1999\08\04@145741 by eplus1

flavicon
face
Maybe if we knew which language you are using we could be of more explicit
assistance.

James Newton, webmaster http://get.to/techref
EraseMEjamesnewtonspam_OUTspamTakeThisOuTgeocities.com <jamesnewtonspamspam_OUTgeocities.com>
1-619-652-0593 phoneÊ



-----Original Message-----
From: pic microcontroller discussion list
[@spam@PICLISTKILLspamspamMITVMA.MIT.EDU]On Behalf Of Juimiin Hong
Sent: Wednesday, August 04, 1999 11:39 AM
To: KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU
Subject: Re: nested if statements


> Yes

What is the format?

I've tried
if

else if

else

endif


and


if

elsif

else

endif


ttul
Juimiin

1999\08\04@160348 by John Pfaff

flavicon
face
Make sure you're using braces correctly.


if( condition )
   statement;
   statement;
else if( condition )
   statement;


won't work.  But


if( condition )
{
   statement;
   statement;
}
else if( condition )
   statement;


will.  Also, it seems to me that there is a compiler out there that doesn't
support nested ifs.  Check your documentation.

-----Original Message-----
From: Juimiin Hong <RemoveMEmeTakeThisOuTspamELASTIC.ORG>
To: spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU <TakeThisOuTPICLISTEraseMEspamspam_OUTMITVMA.MIT.EDU>
Date: Wednesday, August 04, 1999 2:39 PM
Subject: Re: nested if statements


> Yes

What is the format?

I've tried
if

else if

else

endif


and


if

elsif

else

endif


ttul
Juimiin

1999\08\04@160803 by John Pfaff

flavicon
face
Sorry, I assumed you were talking 'C'.  If so, also leave out the endif.  If
you're talking assembler, that's a whole new ballgame.  Also, are you
talking code or pre-processor (#if).  Please be more specific.

-----Original Message-----
From: Juimiin Hong <RemoveMEmespamTakeThisOuTELASTIC.ORG>
To: PICLISTEraseMEspam.....MITVMA.MIT.EDU <EraseMEPICLISTspamMITVMA.MIT.EDU>
Date: Wednesday, August 04, 1999 2:39 PM
Subject: Re: nested if statements


> Yes

What is the format?

I've tried
if

else if

else

endif


and


if

elsif

else

endif


ttul
Juimiin

1999\08\04@201439 by Eric Smith

flavicon
face
> Do nested if statements exist?

Yes.

But for a more meaningful answer, you'll have to ask a more meaningful
question.  For example, you didn't even specify what language you're
using, let alone what tool set.

1999\08\05@133211 by Juimiin Hong

flavicon
face
> Sorry, I assumed you were talking 'C'.  If so, also leave out the endif.  If
> you're talking assembler, that's a whole new ballgame.  Also, are you
> talking code or pre-processor (#if).  Please be more specific.

Sorry about not being more specific. I'm trying to use the MPASM directive
language. The example in the MPASM User's Guide with MPLINK and MPLIB
shows a simple
       if      ; begin conditionally assembled code block
       else
       endif
format, but I want to expand this to nested if statements.

-Juimiin

1999\08\05@134031 by John Pfaff

flavicon
face
I'm sure someone will correct me if I'm wrong, but make sure you put a space
at the beginning of the line before any of the directives.  Otherwise, the
assembler thinks it's a label.

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...