MOD operator in TCC/LE

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,725
47
Albuquerque, NM
prospero.unm.edu
#1
Code:
C:\bin\tccle>ver /r
 
TCC LE  10.00.51   Windows XP [Version 5.1.2600]
TCC LE Build 51   Windows XP Build 2600  Service Pack 3
 
C:\bin\tccle>echo %@eval[13 mod 3]
TCC: Unbalanced parentheses "13 mod 3"
 
C:\bin\tccle>echo %@eval[13 %% 3]
1
 
C:\bin\tccle>
MOD does work as expected in the full TCC.
 
#2
Similarly, the SHR, SHL, AND, OR, XOR words fail, but the >>, <<, &, |, ^
symbols work fine. As is true with MOD versus %%

On Tue, Feb 10, 2009 at 7:51 AM, Charles Dye <>wrote:


> Code:
> ---------
> C:\bin\tccle>ver /r
>
> TCC LE 10.00.51 Windows XP [Version 5.1.2600]
> TCC LE Build 51 Windows XP Build 2600 Service Pack 3
>
> C:\bin\tccle>echo %@eval[13 mod 3]
> TCC: Unbalanced parentheses "13 mod 3"
>
> C:\bin\tccle>echo %@eval[13 %% 3]
> 1
>
> C:\bin\tccle>
> ---------
> MOD does work as expected in the full TCC.
>
>
>
>
>


--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
#3
Expanding variables without using % also fails:
D:\>ver

TCC LE 10.00.51 Windows XP [Version 5.1.2600]

D:\>set zzz=.5

D:\>echo %@eval[zzz]
TCC: Unbalanced parentheses "zzz"


D:\>ver

TCC 10.00.51 Windows XP [Version 5.1.2600]

D:\>set zzz=.5

D:\>echo %@eval[zzz]
0.5


I'll stop reporting on this error now, unless Rex can't duplicate it.


On Tue, Feb 10, 2009 at 2:55 PM, Jim Cook <> wrote:


> Similarly, the SHR, SHL, AND, OR, XOR words fail, but the >>, <<, &, |, ^
> symbols work fine. As is true with MOD versus %%
>
> On Tue, Feb 10, 2009 at 7:51 AM, Charles Dye <>wrote:
>
>
>
> ---Quote---
> > Code:
> > ---------
> > C:\bin\tccle>ver /r
> >
> > TCC LE 10.00.51 Windows XP [Version 5.1.2600]
> > TCC LE Build 51 Windows XP Build 2600 Service Pack 3
> >
> > C:\bin\tccle>echo %@eval[13 mod 3]
> > TCC: Unbalanced parentheses "13 mod 3"
> >
> > C:\bin\tccle>echo %@eval[13 %% 3]
> > 1
> >
> > C:\bin\tccle>
> > ---------
> > MOD does work as expected in the full TCC.
> >
> >
> >
> >
> >
> ---End Quote---
>
>
> --
> Jim Cook
> 2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Sunday.
>
>
>
>
>


--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
#7
This message has been emailed to me 17 times in the last 8 hours.

On Wed, Feb 11, 2009 at 4:05 AM, rconn <> wrote:


> Jim Cook wrote:
>
>
> ---Quote---
> > Similarly, the SHR, SHL, AND, OR, XOR words fail, but the >>, <<, &, |, ^
> > symbols work fine. As is true with MOD versus %%
> ---End Quote---
> Not supported in TCC/LE.
>
>
>
>
>


--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
Jun 3, 2008
27
0
#8
On Wed, 11 Feb 2009 08:04:04 -0600, Jim Cook
<> wrote Re RE: [Support-t-935] MOD operator
in TCC/LE:


>This message has been emailed to me 17 times in the last 8 hours.
>
>On Wed, Feb 11, 2009 at 4:05 AM, rconn <> wrote:
That may be so, but each of them had only on "From:" line in the
header.
--
At first they laugh at you, then they ignore you, then they fight you, then you win.