Take notes on the command line: Difference between revisions

(Added Kotlin)
Line 72:
text s;
 
f_open(f, .open("NOTES.TXT", OPEN_READONLY, 0);
 
while (f_line(f, .line(s) != -1) {
o_texto_(s, "\n");
o_text("\n");
}
} else {
Line 83 ⟶ 82:
file f;
 
f_open(f, .open("NOTES.TXT", OPEN_APPEND | OPEN_CREATE | OPEN_WRITEONLY, 0644);
 
d_now(d).now;
 
f_formf.form(f, "/f4/-/f2/-/f2/ /f2/:/f2/:/f2/\n", d_year(d).year, d_y_month(d).y_month,
d_m_day(d).m_day, d_d_hour(d).d_hour, d_h_minute(d).h_minute, d_m_second(d).m_second);
 
c = '\t';
i = 10;
while ((i += 1) < argc()) {
f_byte(f, .byte(c);
c = ' ';
f_text(f, .text(argv(i));
i += 1;
}
 
f_byte(f, .byte('\n');
}</lang>
 
Anonymous user