Truncated match.
PICList
Thread
'nested if statements'
1999\08\04@135747
by
Juimiin Hong
Hi,
Do nested if statements exist?
ttul
me
1999\08\04@142022
by
eplus1
1999\08\04@143906
by
Juimiin Hong
> 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
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
1999\08\04@160348
by
John Pfaff
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 <RemoveMEmeTakeThisOuT
ELASTIC.ORG>
To: spamBeGonePICLISTspamBeGone
MITVMA.MIT.EDU <TakeThisOuTPICLISTEraseME
spam_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
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 <RemoveMEme
TakeThisOuTELASTIC.ORG>
To: PICLISTEraseME
.....MITVMA.MIT.EDU <EraseMEPICLIST
MITVMA.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
> 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
> 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
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...