Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Problem with If' topicStudent Support Forum > General > "Problem with If"

Next Comment >Help | Reply To Topic
Author Comment/Response
Rune
06/27/12 05:52am

How can this be?:

morgen = "07:00:00";
kveld = "17:00:00";
xy = "If evaluates to True";
yx = "If evaluates to False";
zz = "If evaluates to Neither";
For[i = 1, i <= 20, i++,
Print[i];
check = ((DateDifference[javalistWtime[[i, 13]], morgen] <
0) && (DateDifference[javalistWtime[[i, 13]], kveld] > 0));
Print[check];
If[check,
Print[xy]; (*dagtid=Append[dagtid,javalistWtime[[i]]];*),
Print[yx]; (*kveldstid=Append[dagtid,javalistWtime[[i]]];*),
Print[zz];
];
];

The ourput is;

1
True
If evaluates to Neither
2
True
If evaluates to Neither
3
True
If evaluates to Neither
.
.
.

URL: ,

Subject (listing for 'Problem with If')
Author Date Posted
Problem with If Rune 06/27/12 05:52am
Re: Problem with If Bill Simpson 06/27/12 2:42pm
Next Comment >Help | Reply To Topic