ack/lang/basic/lib/swap.c

26 lines
275 B
C
Raw Normal View History

#include "lib.h"
1984-11-29 14:22:02 +00:00
2016-12-12 20:15:25 +00:00
void _intswap(int* i1, int* i2)
1984-11-29 14:22:02 +00:00
{
int i3;
i3 = *i1;
*i1 = *i2;
*i2 = i3;
1984-11-29 14:22:02 +00:00
}
2016-12-12 20:15:25 +00:00
void _fltswap(double* i1, double* i2)
1984-11-29 14:22:02 +00:00
{
double i3;
i3 = *i1;
*i1 = *i2;
*i2 = i3;
1984-11-29 14:22:02 +00:00
}
2016-12-12 20:15:25 +00:00
void _strswap(String** s1, String** s2)
1984-11-29 14:22:02 +00:00
{
String* s;
s = *s1;
*s1 = *s2;
1984-11-29 14:22:02 +00:00
*s2 = s;
}