#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;
/* clang-format off */
_imp_strncpy(/*?*/&JIM, ({__typeof__(_imp_string255) tmp;/*B*/ tmp = _imp_str_literal("Well, that was unexpected"); (void *)&tmp;}), /*max:*/255);
/* clang-format on */
// 7
// 8 do something(jim)
DOSOMETHING((_imp_string255 *)/*p*/ /*?*/ &JIM);
// 9
// 10 printstring(jim); newline
_imp_PRINTSTRING(
/* clang-format off */
*({ __typeof__(_imp_string255) tmp = JIM/*q*/; (_imp_string255 *)&tmp; })
/* clang-format on */
);
_imp_NEWLINE();
// 11
// 12 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}