> < ^ Date: Fri, 27 May 1994 14:35:00 +0100 (MET)
> ^ From: Jasper Cramwinckel <jasper@win.tue.nl >
^ Subject: Some homework

Hi,

we are three students who have been working on GAP for about half a year now.
We came across some features which the programmers of GAP wanted to keep for
themself. We think that is a shame because we use them a lot!

NOTE: the things mentioned are not bugs, just 'funnies'.

```# Beautiful ##############################################################
a:=[5,5,5,5];
b:=[4,4,4,4];
Maximum(a,b):=7;
```

#And guess what a and b look like!

```# Dirty #################################################################
C := rec();
PrintRec(C);
```

#Look who's coming to dinner!

```# Beautifully dirty #####################################################
C := rec(
a := function (C)
Unbind(C.a);
Print("I'm still here, as long as you're reading it, am I? \n");
end);
```

C.a(C);
#And guess how long C.a exists!

```# to be or not to be #####################################################
IsMat(NullMat(3,0));

# rows and columns #######################################################
TransposedMat([[]]);
```

#And look how many sleeves your shirt still has!

```# A rule of life #######################################################
for i in [1..10^4] do if 2^10 = 1024 and 1 = 0 then ; fi; od;
time;
for i in [1..10^4] do if 1 = 0 and 2^10 = 1024 then ; fi; od;
time;
```

```# The law of gravity ###################################################
Permuted([1,2,3,4], 3);
```

#And try to catch the ball!

```# I am not sure ########################################################

1;;2;;

last = last2;
```

# Are you sure GAP?

```last = last2;
```

# Okay, but what do you think of:

```last = last2;
```

# Ah, I see, but what about:

```last = last2;
```

```# Keeping my condition #############################################
```

# The time Martin spend behind the computer needs to be compensated with
# physical exercise. But how much exercise? Fortunately GAP can help him
# calculate how many miles he has run. Suppose we give him three hours to run:

```time := 3;;
```

# The first sign he sees says: "Aachen 200 miles". We enter this in GAP:

```first := 200;;
```

# After three hours the roadsign says: "Aachen 170 miles". And we tell GAP:

```last := 170;;
```

# To be sure, let's check if GAP got it right:

last;
first;

# Now that looks good. So GAP, how many miles did Martin run:

dist := last-first;;
Print("Martin has run ", dist ," miles. Congratulations!\n");
Print("Oh, it took him ",time," hours to do it\n");

# Oops! I guess we need some more time behind the computer in stead of
# running...

```The StudGAP's,
Erik, Jasper & Reinald
```

> < [top]