#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_initialise(argc, argv);
// 2 %routine do something(%string(255)%name fred)
void DOSOMETHING(_imp_string255 * FRED) {
// 3 fred = "Oh boy, this is fun!"
*FRED = _imp_str_literal("Oh boy, this is fun!");
// 4 %end
return;
} /* end of DOSOMETHING */
// 5
// 6 %string(255) jim = "Well, that was unexpected"
_imp_string255 JIM;
_imp_strncpy(/*?*/ &JIM, ({
__typeof__(_imp_string255) tmp; /*B*/
tmp = _imp_str_literal("Well, that was unexpected");
(void *)&tmp;
}),
/*max:*/ 255);
// 7
// 8 do something(jim)
DOSOMETHING((_imp_string255 *)/*p*/ /*?*/ &JIM);
// 9
// 10 printstring(jim); newline
_imp_PRINTSTRING(
*({
__typeof__(_imp_string255) tmp = JIM /*q*/;
(_imp_string255 *)&tmp;
})
);
_imp_NEWLINE();
// 11
// 12 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}