<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FR-b0n5a1</id>
	<title>MiniScript Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FR-b0n5a1"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/wiki/Special:Contributions/FR-b0n5a1"/>
	<updated>2026-06-04T15:15:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Object-oriented_programming&amp;diff=1418</id>
		<title>Object-oriented programming</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Object-oriented_programming&amp;diff=1418"/>
		<updated>2025-06-08T21:06:20Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Object-oriented programming (OOP) is a way of organizing code and data using objects, which are essentially self-contained units of data and methods that operate on that data. OOP is a fundamental approach to software development in many languages like Java, C++, and Python.&lt;br /&gt;
&lt;br /&gt;
OOP relies on certain key concepts:&lt;br /&gt;
* '''Classes and Objects''': A class is a blueprint for creating objects, which are instances of that class. &lt;br /&gt;
* '''Encapsulation''': Bundling data (fields) and methods (procedures) that operate on that data within a single unit (object). &lt;br /&gt;
* '''Inheritance''': Creating new classes (subclasses) based on existing classes (superclasses), inheriting their attributes and behaviors. &lt;br /&gt;
* '''Polymorphism''': Allowing objects of different classes to be treated as objects of a common superclass, enabling code reuse and flexibility. &lt;br /&gt;
&lt;br /&gt;
== Classes and Objects ==&lt;br /&gt;
In their most straightforward form, classes act as blueprints for objects.  It's like a how you can drive into a rural area of a city and find many new homes with the same design.  The developers used one set of architectural blueprints to build all of those houses.  In the same way, one class can be used to construct many objects.&lt;br /&gt;
&lt;br /&gt;
An object, on the other hand, is an actual active instance of a built class in memory. In most languages, there is a keyword that tells the compiler to create an object from a class such as &amp;lt;c&amp;gt;[[new]]&amp;lt;/c&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Classes are mostly defined by their fields and methods.  Fields are just like variables except they are tied to a class or object.  Methods are similar to functions and they always have access to the fields within their class definition as if they those fields were passed as a parameter to the method.  Sometimes a language will require the keyword prefix &amp;lt;c&amp;gt;[[self]]&amp;lt;/c&amp;gt; when referencing a field or method within the class definition.&lt;br /&gt;
&lt;br /&gt;
In C++, let's define an Animal class:&lt;br /&gt;
&lt;br /&gt;
 class Animal {&lt;br /&gt;
  protected:&lt;br /&gt;
    std::string name;&lt;br /&gt;
    int age;&lt;br /&gt;
  public:&lt;br /&gt;
    Animal(const std::string&amp;amp; name, int age)&lt;br /&gt;
        : name(name), age(age) {}&lt;br /&gt;
    virtual ~Animal() {}&lt;br /&gt;
    virtual void speak() const = 0; // Pure virtual function&lt;br /&gt;
    virtual void info() const {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Name: &amp;quot; &amp;lt;&amp;lt; name &amp;lt;&amp;lt; &amp;quot;, Age: &amp;quot; &amp;lt;&amp;lt; age &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In MiniScript, the same class would be defined as:&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
 Animal = { name:&amp;quot;&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
 Animal.create = function(name, age)&lt;br /&gt;
   a = new Animal&lt;br /&gt;
   a.name = name&lt;br /&gt;
   a.age = age&lt;br /&gt;
   return a&lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Animal.speak = function&lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Animal.info = function&lt;br /&gt;
   print &amp;quot;Name: &amp;quot; + self.name + &amp;quot;, Age: &amp;quot; + self.age&lt;br /&gt;
 end function&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Encapsulation ==&lt;br /&gt;
Encapsulation is more of a design technique to OOP programming and less of a technical aspect of any OOP language.  When you code using this technique, it allows the programmer to organize their project by grouping all behaviour and related data into classes.  When instantiated as an Object, this single container can be passed around in your code to &amp;quot;interact&amp;quot; with other objects.&lt;br /&gt;
&lt;br /&gt;
When coding with encapsulation in mind, all behaviours (methods) and properties (fields) related to a class will be defined in that class.  Knowing where to draw the line to include or exclude behaviour and properties tends to make or break an OOP design.  Often it is better to define something using multiple classes rather than trying to make one monolithic class.  A good rule of thumb is to dedicate a class to a single thing.&lt;br /&gt;
&lt;br /&gt;
Looking back at our Animal class above, we can see that it has two fields (name and age) and essentially two methods (speak and info).  Looking at &amp;lt;c&amp;gt;info()&amp;lt;/c&amp;gt; we can see that it only uses &amp;lt;c&amp;gt;name&amp;lt;/c&amp;gt; and &amp;lt;c&amp;gt;age&amp;lt;/c&amp;gt;.  As mentioned, that is what is defined in the class and so those are the only variables it has access to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;amp;#128218; The other two methods in C++ are the constructor and destructor.  In MiniScript, you are not required to have either of these.  However, creating a constructor may help to declutter your code and make it easier to read.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Inheritance ==&lt;br /&gt;
In the same way that humans inherit certain genetic traits from their parents, classes can inherit from a single parent classes (some languages support multiple inheritance as well).  When a class inherits from another, all of the declared fields and methods of the parent class are automatically given to the child class.  Only the inheritance has to be defined for this to work.  For instance, in our Animal class, let's create two new children called Dog and Cat.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 class Cat : public Animal {&lt;br /&gt;
 private:&lt;br /&gt;
    bool likesToClimb;&lt;br /&gt;
 public:&lt;br /&gt;
    Cat(const std::string&amp;amp; name, int age, bool likesToClimb)&lt;br /&gt;
        : Animal(name, age), likesToClimb(likesToClimb) {}&lt;br /&gt;
    void speak() const override {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; name &amp;lt;&amp;lt; &amp;quot; says: Meow!&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
    void info() const override {&lt;br /&gt;
        Animal::info();&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Likes to climb: &amp;quot; &amp;lt;&amp;lt; (likesToClimb ? &amp;quot;Yes&amp;quot; : &amp;quot;No&amp;quot;) &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 class Dog : public Animal {&lt;br /&gt;
 private:&lt;br /&gt;
    std::string favoriteToy;&lt;br /&gt;
 public:&lt;br /&gt;
    Dog(const std::string&amp;amp; name, int age, const std::string&amp;amp; favoriteToy)&lt;br /&gt;
        : Animal(name, age), favoriteToy(favoriteToy) {}&lt;br /&gt;
    void speak() const override {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; name &amp;lt;&amp;lt; &amp;quot; says: Woof!&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
    void info() const override {&lt;br /&gt;
        Animal::info();&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Favorite toy: &amp;quot; &amp;lt;&amp;lt; favoriteToy &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
In MiniScript, these would be defined as:&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
 Cat = new Animal&lt;br /&gt;
 Cat.likesToClimb = true&lt;br /&gt;
 Cat.create = function(name, age, likesToClimb)&lt;br /&gt;
   c = new Cat&lt;br /&gt;
   c.name = name&lt;br /&gt;
   c.age = age&lt;br /&gt;
   c.likesToClimb = likesToClimb&lt;br /&gt;
   return c&lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Cat.speak = function&lt;br /&gt;
   print self.name + &amp;quot; says: Meow!&amp;quot;&lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Cat.info = function&lt;br /&gt;
   super&lt;br /&gt;
   print &amp;quot;Likes to Climb: &amp;quot; + self.likesToClimb &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Dog = new Animal&lt;br /&gt;
 Dog.favouriteToy = &amp;quot;None&amp;quot;&lt;br /&gt;
 Dog.create = function(name, age, favouriteToy)&lt;br /&gt;
   d = new Dog&lt;br /&gt;
   d.name = name&lt;br /&gt;
   d.age = age&lt;br /&gt;
   d.favouriteToy = self.favouriteToy&lt;br /&gt;
   return d&lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Dog.speak = function&lt;br /&gt;
   print self.name + &amp;quot; says: Woof!&amp;quot;&lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
 Dog.info = function&lt;br /&gt;
   super&lt;br /&gt;
   print &amp;quot;Favourite Toy: &amp;quot; + self.favouriteToy &lt;br /&gt;
 end function&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MiniScript supports prototype-based OOP through &amp;lt;c&amp;gt;[[new]]&amp;lt;/c&amp;gt;, &amp;lt;c&amp;gt;[[self]]&amp;lt;/c&amp;gt;,  &amp;lt;c&amp;gt;[[super]]&amp;lt;/c&amp;gt;, and &amp;lt;c&amp;gt;[[isa|__isa]]&amp;lt;/c&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Language]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=RawData.setByte&amp;diff=1305</id>
		<title>RawData.setByte</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.setByte&amp;diff=1305"/>
		<updated>2025-01-30T00:38:43Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;[[RawData]].setByte&amp;lt;/c&amp;gt; writes an unsigned byte into a [[RawData]] buffer.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Type !! Default Value !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| ''offset'' || number || 0 || position in buffer at which to start writing&lt;br /&gt;
|-&lt;br /&gt;
| ''value'' || number || 0 || unsigned byte to write&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
data = [13, 32, 47, 92, 95, 47, 92, 13, 40, 32, 111, 46, 111, 32, 41, 13, 32, 62, 32, 94, 32, 60, 13, 32, 77, 69, 79, 87, 33, 13]&lt;br /&gt;
&lt;br /&gt;
a = new RawData&lt;br /&gt;
a.resize data.len&lt;br /&gt;
for i in range (0, data.len - 1)&lt;br /&gt;
	a.setByte i, data[i]&lt;br /&gt;
end for&lt;br /&gt;
&lt;br /&gt;
print a.utf8&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
This example creates a [[RawData]] buffer, sizes it to length of data array, and then writes each byte of data array in the buffer, and finally print the buffer as an UTF-8 string (here : a little ASCII art of a cat).&lt;br /&gt;
&lt;br /&gt;
See also : [[RawData.byte]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=RawData.byte&amp;diff=1304</id>
		<title>RawData.byte</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.byte&amp;diff=1304"/>
		<updated>2025-01-30T00:37:33Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: Created page with &amp;quot;&amp;lt;c&amp;gt;RawData.byte&amp;lt;/c&amp;gt; gets one unsigned byte from a RawData buffer.  {| class=&amp;quot;wikitable&amp;quot; |- ! Parameter Name !! Type !! Default Value !! Meaning |- | ''offset'' || numb...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;[[RawData]].byte&amp;lt;/c&amp;gt; gets one unsigned byte from a [[RawData]] buffer.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Type !! Default Value !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| ''offset'' || number || 0 || position in buffer at which get the value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
PNG_HEADER = [137, 80, 78, 71, 13, 10, 26, 10]&lt;br /&gt;
&lt;br /&gt;
filePath = &amp;quot;/sys/pics/tank.png&amp;quot;&lt;br /&gt;
rawImg = file.loadRaw(filePath)&lt;br /&gt;
&lt;br /&gt;
isPNG = true&lt;br /&gt;
for i in range (0, PNG_HEADER.len - 1)&lt;br /&gt;
	isPNG = isPNG and PNG_HEADER[i] == rawImg.byte(i)&lt;br /&gt;
end for&lt;br /&gt;
&lt;br /&gt;
if isPNG then&lt;br /&gt;
	print filePath + &amp;quot; is a PNG file&amp;quot;&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
This example loads a file as a [[RawData]] buffer, and then checks the first 8 bytes to determine if it is a PNG file.&lt;br /&gt;
&lt;br /&gt;
See also : [[RawData.setByte]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=RawData.setByte&amp;diff=1303</id>
		<title>RawData.setByte</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.setByte&amp;diff=1303"/>
		<updated>2025-01-29T23:28:52Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: Created page with &amp;quot;&amp;lt;c&amp;gt;RawData.setByte&amp;lt;/c&amp;gt; writes an unsigned byte into a RawData buffer.  === Arguments ===  {| class=&amp;quot;wikitable&amp;quot; |- ! Parameter Name !! Type !! Default Value !! Meaning...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;[[RawData]].setByte&amp;lt;/c&amp;gt; writes an unsigned byte into a [[RawData]] buffer.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Type !! Default Value !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| ''offset'' || number || 0 || position in buffer at which to start writing&lt;br /&gt;
|-&lt;br /&gt;
| ''value'' || number || 0 || unsigned byte to write&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
data = [13, 32, 47, 92, 95, 47, 92, 13, 40, 32, 111, 46, 111, 32, 41, 13, 32, 62, 32, 94, 32, 60, 13, 32, 77, 69, 79, 87, 33, 13]&lt;br /&gt;
&lt;br /&gt;
a = new RawData&lt;br /&gt;
a.resize data.len&lt;br /&gt;
for i in range (0, data.len - 1)&lt;br /&gt;
	a.setByte i, data[i]&lt;br /&gt;
end for&lt;br /&gt;
&lt;br /&gt;
print a.utf8&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
This example creates a [[RawData]] buffer, sizes it to length of data array, and then writes each byte of data array in the buffer, and finally print the buffer as an UTF-8 string (here : a little ASCII art of a cat).&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=RawData.setUtf8&amp;diff=1302</id>
		<title>RawData.setUtf8</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.setUtf8&amp;diff=1302"/>
		<updated>2025-01-29T23:25:28Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;[[RawData]].setUtf8&amp;lt;/c&amp;gt; writes a string into a [[RawData]] buffer in UTF-8 format, and returns the number of bytes written.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Type !! Default Value !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| ''offset'' || number || 0 || position in buffer at which to start writing&lt;br /&gt;
|-&lt;br /&gt;
| ''s'' || string || &amp;quot;&amp;quot; || string to write&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&lt;br /&gt;
This function returns the number of bytes written.  If the given string contains only ASCII characters, than this is equal to the [[len]] of the string.  If it contains any non-ASCII characters, then it will be more than the length of the string, since non-ASCII characters require multiple bytes to represent in UTF-8.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;r = new RawData&lt;br /&gt;
r.resize 32&lt;br /&gt;
print r.setUtf8(4, &amp;quot;Hello!&amp;quot;)&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example creates a [[RawData]] buffer, sizes it to 32 bytes, and then writes the string &amp;quot;Hello!&amp;quot; starting at byte 4.  It prints out 6, as that is the number of bytes in the string.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=RawData.setUtf8&amp;diff=1301</id>
		<title>RawData.setUtf8</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=RawData.setUtf8&amp;diff=1301"/>
		<updated>2025-01-29T23:05:04Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;RawData.setUtf8&amp;lt;/c&amp;gt; writes a string into a [[RawData]] buffer in UTF-8 format, and returns the number of bytes written.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Type !! Default Value !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| ''offset'' || number || 0 || position in buffer at which to start writing&lt;br /&gt;
|-&lt;br /&gt;
| ''s'' || string || &amp;quot;&amp;quot; || string to write&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&lt;br /&gt;
This function returns the number of bytes written.  If the given string contains only ASCII characters, than this is equal to the [[len]] of the string.  If it contains any non-ASCII characters, then it will be more than the length of the string, since non-ASCII characters require multiple bytes to represent in UTF-8.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;r = new RawData&lt;br /&gt;
r.resize 32&lt;br /&gt;
print r.setUtf8(4, &amp;quot;Hello!&amp;quot;)&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example creates a [[RawData]] buffer, sizes it to 32 bytes, and then writes the string &amp;quot;Hello!&amp;quot; starting at byte 4.  It prints out 6, as that is the number of bytes in the string.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Key.put&amp;diff=1294</id>
		<title>Key.put</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Key.put&amp;diff=1294"/>
		<updated>2025-01-29T20:22:36Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: Created page with &amp;quot;&amp;lt;c&amp;gt;key.put&amp;lt;/c&amp;gt; allows you to enqueue a string, or single character by code point, into the keyboard buffer.  == Example == &amp;lt;ms&amp;gt; // Put MiniScript code for a countdown from...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;[[key]].put&amp;lt;/c&amp;gt; allows you to enqueue a string, or single character by code point, into the keyboard buffer.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
// Put MiniScript code for a countdown from 10 to 1, then print &amp;quot;BOOM!&amp;quot;&lt;br /&gt;
key.put &amp;quot;for i in range(10, 1); clear; print i; wait; end for; clear; print &amp;quot;&amp;quot;BOOM!&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
key.put 13 // carriage return&lt;br /&gt;
&lt;br /&gt;
// Put MiniScript code to print &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
key.put &amp;quot;print &amp;quot;&amp;quot;Hello, World!&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
key.put 13 // carriage return&lt;br /&gt;
&lt;br /&gt;
key.put 99  // c&lt;br /&gt;
key.put 108 // l&lt;br /&gt;
key.put 101 // e&lt;br /&gt;
key.put 97  // a&lt;br /&gt;
key.put 114 // r&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Or&amp;diff=1293</id>
		<title>Or</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Or&amp;diff=1293"/>
		<updated>2025-01-29T19:19:29Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: Created page with &amp;quot;&amp;lt;c&amp;gt;or&amp;lt;/c&amp;gt; is a keyword for logical binary operator of disjunction (or) of [https://en.wikipedia.org/wiki/Boolean_algebra boolean algebra]. It evaluates...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;or&amp;lt;/c&amp;gt; is a [[:Category:Keywords|keyword]] for logical binary operator of disjunction (or) of [https://en.wikipedia.org/wiki/Boolean_algebra boolean algebra]. It evaluates two operands and returns &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; when at least one of the operands is &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt;, else it returns &amp;lt;c&amp;gt;false&amp;lt;/c&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
print false or false // output : 0&lt;br /&gt;
print false or true  // output : 1&lt;br /&gt;
print true or false  // output : 1&lt;br /&gt;
print true or true   // output : 1&lt;br /&gt;
&lt;br /&gt;
a = false&lt;br /&gt;
b = true&lt;br /&gt;
c = false&lt;br /&gt;
print a or b // output : 1&lt;br /&gt;
print b or c // output : 1&lt;br /&gt;
print a or c // output : 0&lt;br /&gt;
&lt;br /&gt;
minimum = 3&lt;br /&gt;
maximum = 7&lt;br /&gt;
A = 4&lt;br /&gt;
B = 9&lt;br /&gt;
print A &amp;gt; minimum or B &amp;lt; maximum // output : 1&lt;br /&gt;
print A &amp;lt; minimum or B &amp;lt; maximum // output : 0&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
[[Category:Keywords]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=And&amp;diff=1292</id>
		<title>And</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=And&amp;diff=1292"/>
		<updated>2025-01-29T19:18:29Z</updated>

		<summary type="html">&lt;p&gt;FR-b0n5a1: Created page with &amp;quot;&amp;lt;c&amp;gt;and&amp;lt;/c&amp;gt; is a keyword for logical binary operator of conjunction (and) of [https://en.wikipedia.org/wiki/Boolean_algebra boolean algebra]. It evaluate...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;and&amp;lt;/c&amp;gt; is a [[:Category:Keywords|keyword]] for logical binary operator of conjunction (and) of [https://en.wikipedia.org/wiki/Boolean_algebra boolean algebra]. It evaluates two operands and returns &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; only when both operands are &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt;, else it returns &amp;lt;c&amp;gt;false&amp;lt;/c&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
print false and false // output : 0&lt;br /&gt;
print false and true  // output : 0&lt;br /&gt;
print true and false  // output : 0&lt;br /&gt;
print true and true   // output : 1&lt;br /&gt;
&lt;br /&gt;
a = true&lt;br /&gt;
b = false&lt;br /&gt;
c = true&lt;br /&gt;
print a and b // output : 0&lt;br /&gt;
print b and c // output : 0&lt;br /&gt;
print a and c // output : 1&lt;br /&gt;
&lt;br /&gt;
minimum = 3&lt;br /&gt;
maximum = 7&lt;br /&gt;
A = 4&lt;br /&gt;
B = 9&lt;br /&gt;
print A &amp;gt; minimum and A &amp;lt; maximum // output : 1&lt;br /&gt;
print B &amp;gt; minimum and B &amp;lt; maximum // output : 0&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
[[Category:Keywords]]&lt;/div&gt;</summary>
		<author><name>FR-b0n5a1</name></author>
		
	</entry>
</feed>