switch(type ) { case LUA_TNUMBER: //number型 printf("%f",lua_tonumber(L, i) ); break; case LUA_TBOOLEAN: //boolean型 if(lua_toboolean(L,i) ){ printf("true"); }else{ printf("false"); } break; case LUA_TSTRING: //string型...
switch (x) { case 1: System.out.println("1"); // No break statement here. case 2: System.out.println("2"); } このコードのコンパイル時に -Xlint:fallthrough フラグが使用されていた場合、コンパイラは該当するケースの行番号とともに、fall-through ケースの可能性があることを示...
Register as a new user and use Qiita more conveniently You get articles that match your needs You can efficiently read back useful information You can use dark theme What you can do with signing up Sign upLogin Comments No comments Let's comment your feelings that are more than good ...
(" pop rax\n"); switch (node.kind) { case NodeKind.ND_ADD: Console.Write(" add rax, rdi\n"); break; case NodeKind.ND_SUB: Console.Write(" sub rax, rdi\n"); break; case NodeKind.ND_MUL: Console.Write(" imul rax, rdi\n"); break; case NodeKind.ND_DIV: Console.Write("...
mmapで読み書き実行が可能な領域を確保し、そこにcodeを書き込んでから実行します。 これにより実行時に命令部を書き換えてもSegmentation faultせずに実行できます。 wandboxでの実行例がこちらになります。 しっかりとhello worldできていますね。
配列のインデックス番号が必要なときはenumerate関数を使う while 条件が成立している間繰り返す C言語と同じbreak とcontinue も同じ do-while 最初に1回無条件に実行 なし switch-case 場合分け なし辞書を使って場合分けできる del なし 変数を削除できる ライブラリ取り込み #include import...