Skip to content
Hamza Naper edited this page May 30, 2014 · 3 revisions

Welcome to the libmpp wiki!

#Functions (libmpp 1.1)

ktab

Description

Prints a formatted string.

Syntax

ra9m ktab(joumla message,...);

Examples

  #include <mpp.h>
  ra9m bda()
  {
    ktab("Hello World\n"); // \n is a new line character

    // we can use variables inside the ktab function
    ra9m var = 4;
    ktab("The var value is %d", var);
    rja3 0;
  }

rlstar

Description

Prints a formatted string with a new line feed character at the end.

Syntax

ra9m rlstar(joumla message,...);

Examples

  #include <mpp.h>

  ra9m bda()
  {
    rlstar("Line 1");
    rlstar("Line 2");
    rja3 0;
  }

_9ra

Description

reads data from a formatted input.

Syntax

khawi _9ra(joumla message,...);

Examples

  #include <mpp.h>
  ra9m bda()
  {
    ra9m num;
    ktab("Please enter a number :");
    _9ra("%d",&num);
    ktab("Entered number is %d", num);
    rja3 0;
 }

r9ra

Description

reads numbers from a formatted input.

Syntax

khawi r9ra(ra9m a);

Examples

  #include <mpp.h>
  ra9m bda()
  {
    ra9m num;
    ktab("Please enter a number :");
    r9ra(num);
    ktab("Entered number is %d", num);
    rja3 0;
  }

zaid

Description

Returns the value of the addition of two operands.

Syntax

_ra9me zaid(ra9m a, ra9m b);

Examples

  #include <mpp.h>
  ra9m bda()
  {
    ra9m num1 = 4;
    ra9m num2 = 2;
    ra9m addition = zaid(num1,num2); // 4 + 2
    ktab("%d + %d = %d", num1, num2, addition); // 2 + 4 = 6
    rja3 0;
  }

na9is

Description

Returns the value of the subtraction of two operands.

Syntax

_ra9me _na9is(ra9m a, ra9m b);

Examples

  #include <mpp.h>
  ra9m bda()
  {
    ra9m num1 = 4;
    ra9m num2 = 2;
    ra9m subtraction = na9is(num1,num2); // 4 - 2

    ktab("%d - %d = %d", num1, num2, subtraction); // 4 - 2 = 2
    rja3 0;
  }
Clone this wiki locally