mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
23 lines
365 B
C
23 lines
365 B
C
|
|
/* Runtime library */
|
||
|
|
|
||
|
|
# include <stdio.h>
|
||
|
|
|
||
|
|
/* Lread is an implementation of the "read" construct */
|
||
|
|
extern int Lread () {
|
||
|
|
int result;
|
||
|
|
|
||
|
|
printf ("> ");
|
||
|
|
fflush (stdout);
|
||
|
|
scanf ("%d", &result);
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Lwrite is an implementation of the "write" construct */
|
||
|
|
extern int Lwrite (int n) {
|
||
|
|
printf ("%d\n", n);
|
||
|
|
fflush (stdout);
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|