Skip to content

Instructions

Charlotte edited this page Feb 5, 2022 · 2 revisions

Maths

So one of the main purpose of any language is to do maths yeah ? So the following instructions are by default implemented in Baguette# Standard Library ( the B#SL ). A number is an integer or a floating point number.

  • CANELE <list of numbers> returns a number which is the sum of the arguments (if you put a string somewhere in the args it will switch to concatenation of strings for the remaining of the list)
  • STHONORE <list of numbers> same as CANELE but with the standard multiplication
  • KOUGNAMANN <number:a> <number:b> returns a^b
  • PROFITEROLE <number:a> returns the square root of a
  • FINANCIER <int:n> returns the nth Fibonacci number as an integer
  • PAINAURAISIN <number:a> <number:b> returns a-b
  • CHOCOLATINE <number:a> <number:b> returns a/b
  • BRETZEL <int:a> <int:b> returns a random integer in [a,b]
  • BAGUETTEVIENNOISE <number:a> <number:b> returns the logarithm of a in the base b, so ln a/ln b with ln being the natural log
  • OPERA <number:a> returns -a
  • MILLEFEUILLE <number:a> returns the floor of a as an integer
  • FRAISIER <number:a> returns the ceil of a as an integer

IO

The language includes IO on the standard output/input and in this section the handling of variables is also included

  • CROISSANT <list of arguments> prints the arguments separated with a blank character, this list can be non-homogeneous meaning you can print integers,booleans,floats and strings with the same instruction, this instruction also ends with a newline character.
  • PAINAUCHOCOLAT <message> <list of replacement> a printf version of CROISSANT the placeholder is %d for everything.
  • QUATREQUART <string:name> <argument:value> create a new variable with the index name and assign it the value value
  • MADELEINE <string:name> offer access to the variable of index name throw an exception if the index does not exist
  • ECLAIR read the standard input

Boolean algebra

yeah i could have call this one "conditions" but it is cooler this way, as stated in Home, the operators are instructions too, they can throw a NON_COMPARABLE exception ( exception handling is not implemented and is not in the short term implementation ideas to do list )

  • TIRAMISU <argument:a> <argument:b> returns a==b
  • MERINGUE <argument:a> <argument:b> returns a<=b
  • MERVEILLE <argument:a> <argument:b> returns a<b`
  • BRIOCHE <argument:a> <argument:b> returns a>=b
  • TARTE <argument:a> <argument:b> returns a>b
  • FLAN <argument:a> <argument:b> returns a&&b
  • PAINDEPICE <argument:a> <argument:b> returns a||b
  • CREPE <argument:a> <argument:b> returns a XOR b
  • CHAUSSONAUXPOMMES <argument:a> returns not a
Clone this wiki locally