>>> print_cvs
Compiled variables count: 0
>>> print $eg
$9 = {
uninitialized_zval = {
value = {
lval = 0,
dval = 0,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": true | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM R=ランダムフラグ 0=イツモノ 1=ランダム | |
REM N=ツギヘノポインタ | |
1 N=10:R=1 | |
2 IF SOUND()<>1 THEN GOTO 3 ELSE GOTO 2 | |
3 IF R==0 THEN GOTO N ELSE GOTO 4 | |
4 N=(RND(9)+1)*10:GOTO N | |
10 ?"ド":PLAY "C4D8E4C8 E4C4E2":N=20 | |
11 GOTO 2 | |
20 ?"レ":PLAY "D4E8F8 F8 E8 D8 F2":N=30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
def ordinal_numeral_en(num): | |
one_hundred = num % 100 | |
if one_hundred > 3 and one_hundred <= 20: | |
return "th" | |
if one_hundred % 10 == 1: | |
return "st" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int i; | |
i = 10; | |
switch (i) { | |
case 1: | |
case 3: | |
printf("hello world: %d\n", i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
sqlライブラリにプリペアドステートメントを追加しました。 | |
Kuinの変数とデータベースとの間で読み書きができるようになります。 | |
## 使い方 | |
1. `[email protected]` でSQLを準備する。バインドしたい値がある場合、プレースホルダー `?`を設置する | |
2. `[email protected]*` を使って変数をセット(バインド)する | |
3. `[email protected]` or `[email protected]` メソッドでSQLの実行 | |
+ `[email protected]` の場合は`while`文を利用して、0行を含むすべての行の取得ができるようになります |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+func main() | |
{ | |
sqlライブラリに、以下2つの機能を追加してみました。 | |
### getBlob関数 | |
func getBlob(col: int): []bit8 | |
SQLiteではデータ型にBLOBが使えるため、Kuinの[]bit8で取得できるとバイナリを扱えるので作成しました。使い方としてはsql@getIntやsql@getFloat、sql@getStrでの使い方と同じように、列をcolで指定します。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const excptCalcErr: int :: 0x0001 | |
var isErr: bool :: false | |
func main() | |
do \wnd_calc@show() | |
while(wnd@act()) | |
end while | |
do \wnd_calc@close() | |
end func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() | |
var c: []char :: "-9223372036854775808" | |
var existed: bool | |
var title: []char :: c.toInt(&existed).toStr() | |
var i: int :: -9223372036854775808 | |
do wnd@msgBox(null, "\{title} existed: \{existed.toStr()}", " overflow test ", %info, %ok) | |
end func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Cth.h> | |
#define LED 13 | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
pinMode(LED, OUTPUT); | |
Scheduler.startLoop(ledBlinkLoop); | |
Scheduler.startLoop(serialPrintLoop); |