?

From Esolang
Jump to navigation Jump to search

? (Ask, None-Ask) is a NONE dialect created by Jaip that allows the user to input numbers and strings and calculate basic expressions.

Name

The name "?" or "Ask" refers to the command "?" ("Ask"), with which the user's input can be accessed in "?".

Syntax

The syntax is the same as in NONE, only that there are some additional commands.

? asks for an input, ! outputs an input value.

Memory system

? has a memory for two numbers and one string. A number input always alternately overwrites the memory for the two numbers. So if Number 1 (N1) was last overwritten, Number 2 (N2) will now be overwritten.

Commands

+ after ? or ! stands for a number, - stands for a string. !++ calls a numerical value, !+- a calculation.

? Description
?+ Asks for a number input
?- Asks for a string input
!+ Returns N1 and N2
!++ Returns N1
!++- Returns N2
!+- Returns N1 + N2
!+-+ Returns N1 - N2
!+-- Returns N1 * N2
!+-++ Returns N1 / N2
!- Returns the string

To output the ! values, type p after the command.

Example: !+--p

Examples

Cat program

?-!-p

Calculator

++++++^pc++p+x++pc++++++p+t----p-x++pc++pc+x+v++++++++++p-vp++++++p
m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)m(++++)
+v^p+x--pc+x+v++++++++++pc+vp+x++++++p_c+v++p++++++p+x--p++pc+x+v++++++++++p_-v--p+v++++p-x++++pc++++pc+vp+x++++++ps(+v)?+
+v^p+x--pc+x+v++++++++++pc+vp+x++++++p_++pc+vp----p+x++++p--pc+v--p_+xp+v++++p-x++++pc++++pc+vp+x++++++ps(+v)?+
+t----^pc+vp+x+v--p++++p-x++pc+x+v++++++++++ps(+v)
!++p_m(++)_!++-p_m(+v)_!+-p
!++p_m(++++)_!++-p_m(+v)_!+-+p
!++p_m(++++++)_!++-p_m(+v)_!+--p
!++p_m(+v--)_!++-p_m(+v)_!+-++p

Links