INKEY$()を実装
This commit is contained in:
@@ -1447,6 +1447,10 @@ class BuiltinFunction
|
||||
{
|
||||
return (label in p.vm.currentSlot.globalLabel) != null;
|
||||
}
|
||||
static wstring INKEY(PetitComputer p)
|
||||
{
|
||||
return p.inkey();
|
||||
}
|
||||
//alias void function(PetitComputer, Value[], Value[]) BuiltinFunc;
|
||||
static BuiltinFunctions[wstring] builtinFunctions;
|
||||
static wstring getBasicName(BFD)(const wstring def)
|
||||
|
||||
@@ -1536,6 +1536,16 @@ class PetitComputer
|
||||
//display = olddisplay;
|
||||
return buffer;
|
||||
}
|
||||
wstring inkey()
|
||||
{
|
||||
if (!keybufferlen)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
auto result = keybuffer[(keybufferpos - keybufferlen)];
|
||||
keybufferlen--;
|
||||
return result.key.to!wstring;
|
||||
}
|
||||
int CSRX;
|
||||
int CSRY;
|
||||
int CSRZ;
|
||||
|
||||
Reference in New Issue
Block a user