2
解释基普尔!
介绍 Kipple是Rune Berg于2003年3月发明的基于堆栈的深奥编程语言。 Kipple有27个堆栈,4个运算符和一个控制结构。 堆栈 堆栈被命名为a- z并包含32位带符号整数。还有一个特殊的堆栈,@使输出数字更加方便。当将数字压入时@,实际上将压入该数字的ASCII值。(例如,如果您将12推到@,它将推49,然后推50。@) i在执行程序之前,将输入压入输入堆栈。解释器将i在执行之前要求存储值。执行完成后,输出堆栈上的所有内容o都会弹出以ASCII字符形式输出。由于这是Kipple唯一的IO机制,因此无法与Kipple程序进行交互。 经营者 操作数可以是堆栈标识符或带符号的32位整数。 推送:>或< 语法:Operand>StackIndentifier或StackIndentifier<Operand Push运算符将操作数向左移并将其推入指定的堆栈。例如,12>a将值12推入stack a。a>b将从堆栈中弹出最高值a并将其推入堆栈b。弹出空堆栈总是返回0 a<b相当于b>a。a<b>c从弹出最高值,b并同时推入c和a。 加: + 句法: StackIndentifier+Operand Add运算符将堆栈上最顶层项目和操作数之和压入堆栈。如果操作数是堆栈,则从中弹出值。例如,如果堆栈的最高值为a1,a+2则将3压入堆栈。如果a为空,a+2则将2推入。如果堆叠的最值a和b是1和2,然后a+b将从栈中弹出的值2 b和3推入堆栈a。 减去: - 句法: StackIndentifier-Operand 减法运算符的工作方式与加法运算符完全相同,只是它减去而不是加法。 明确: ? 句法: StackIndentifier? 如果最上面的项目为0,则Clear运算符将清空堆栈。 解释器将忽略操作符旁边不存在的所有内容,因此以下程序将起作用:a+2 this will be ignored c<i。但是,添加注释的正确方法是使用#字符。#执行前,a 和行尾字符之间的所有内容都将被删除。ASCII字符#10在Kipple中定义为行尾。 操作数可以由两个运算符共享,例如a>b c>b c?可以写为a>b<c?。 该程序1>a<2 a+a将导致a包含值[1 4](从下到上),而不是[1 3]。对于-操作员也是如此。 控制结构 Kipple中只有一种控制结构:循环。 句法: (StackIndentifier code …
12
code-golf
interpreter
code-golf
string
code-golf
math
string
code-golf
ascii-art
path-finding
code-golf
string
ascii-art
code-golf
interpreter
binary
logic-gates
logic
code-golf
ascii-art
code-golf
graph-theory
code-golf
string
code-golf
number
sorting
code-golf
number-theory
random
cryptography
polynomials
code-golf
number
code-golf
math
number
sequence
code-golf
quine
code-generation
code-golf
arithmetic
set-theory
code-golf
sequence
code-golf
code-golf
string
math
fastest-code
optimization
code-golf
code-golf
internet
stack-exchange-api
code-golf
array-manipulation
code-golf
string
internet
string
code-challenge
internet
test-battery
code-golf
math
pi
code-golf
arithmetic
primes
code-golf
array-manipulation
code-golf
string
code-golf
string
palindrome
code-golf
sequence
number-theory
fastest-algorithm
code-golf
math
number
base-conversion
code-golf
number-theory
sorting
subsequence
search
code-golf
permutations
code-challenge
popularity-contest
code-generation