• R/O
  • HTTP
  • SSH
  • HTTPS

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

超漢字上で、mrubyを使ってhello worldを表示させる。


File Info

Révision 5048c78be9679f7eb7bb6e9609cb9992fb12a7d9
Taille 356 octets
l'heure 2017-06-05 23:21:02
Auteur ornse01
Message de Log

Merge branch 'switch_1.2'

Content

/* from https://github.com/mruby/mruby/wiki/Hello-World */

#include	<basic.h>
#include	<btron/btron.h>
#include	<mruby.h>
#include	<mruby/compile.h>

EXPORT	W	MAIN(MESSAGE *msg)
{
	mrb_state *mrb = mrb_open();
	if (!mrb) { /* handle error */ }
	puts("Executing Ruby code from C!");
	mrb_load_string(mrb, "p 'hello world!'");
	mrb_close(mrb);
	return 0;
}