Menu

#145 for and while loops don't work in Basilisk II

Release 5.6.1r*
closed-works-for-me
5
2002-09-05
2002-09-05
Anonymous
No

Hi,

on the Mac emulator Basilisk II I installed 5.6.1r1.
The following problem occurs:
for and while loops doesn't seem to work.
Just foreach loops.

The following script gives the following output:

#!/usr/bin/perl

print "\n\n\nwhile\n";
$x=11;
$i=0;
while($i<$x){
print $i."\n";
$i++;
}

print "for \n";

for($i=0; $i<$x; $i++){
print $i."\n";
}

print "foreach\n";

foreach $i (1..$x){
print $i."\n";
}

Output:

while
for
foreach
1
2
3
4
5
6
7
8
9
10
11

Umgebung:
Basilisk II (emuliert nen 040er Mac mit MacOS 8.1, 64
MB Ram)
Sorry, don't have a MacPerl on a classic mac, but the
above script does work correctly on Solaris and
Windows. But unfortunaltey I cannot check, if it would
work on a real Mac (with MacPerl).

Ciao
Markus

Discussion

  • Chris Nandor

    Chris Nandor - 2002-09-05
    • labels: 105319 --> MacPerl Application
    • assigned_to: nobody --> pudge
    • summary: for and while loops don't work --> for and while loops don't work in Basilisk II
    • status: open --> closed-works-for-me
     
  • Chris Nandor

    Chris Nandor - 2002-09-05

    Logged In: YES
    user_id=3660

    I don't know anything about Basilisk. I know that while and
    for both work in MacPerl. Without further information I
    can't say what the problem could be. I'm going to close
    this report, because it works fine in Mac OS and under
    Classic in Mac OS X; if more information, perhaps via a
    debugger, can be uncovered, then please reopen the report
    with the additional information (or submit a new report).
    Sorry I can't be of more help, but I can't see any problems.
    I also tried it in the 68K version of MacPerl, to be sure.
    No problems.

     

Log in to post a comment.

MongoDB Logo MongoDB