• odd in mpl

    From dream master@21:1/163 to g00r00 on Monday, May 21, 2018 15:02:02
    i would like to see the odd function added to mpl unless there is
    another wayto tell if a value is odd or even?
    .úùDream Masterù
    ú.øùúùøøùúùø
    DoRE!ACiDiC!Demonic[dreamla
    nd.darktech.org]
    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From apam@21:1/125 to dream master on Tuesday, May 22, 2018 08:47:32
    i would like to see the odd function added to mpl unless there is
    another wayto tell if a value is odd or even? .��Dream Master�

    See if there is a remainder after dividing by two?

    Andrew

    --- MagickaBBS v0.11alpha (Linux/x86_64)
    * Origin: Exotica BBS - telnet://exoticabbs.com:2023/ (21:1/125)
  • From Gryphon@21:1/120 to dream master on Monday, May 21, 2018 17:08:34
    On 05/21/18, dream master said the following...

    i would like to see the odd function added to mpl unless there is another to tell if a value is odd or even?

    Just use the modulus operation

    val x: integer
    val testval : integer = 33

    x:= textval % 2
    if x = 0 then writeln(int2str(testval)+'is even'
    if x = 1 then wrote;m(int2str(testval)+'is odd'

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: Cyberia BBS | cyberia.darktech.org | San Jose, CA (21:1/120)
  • From dream master@21:1/163 to Gryphon on Tuesday, May 22, 2018 01:24:14
    On 05/21/18, Gryphon said the following...
    val x: integer
    val testval : integer = 33
    x:= textval % 2
    if x = 0 then writeln(int2str(testval)+'is even'
    if x = 1 then wrote;m(int2str(testval)+'is odd'

    i'm trying to convert my reg code maker to mpl. thank you

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic |08[|15dreamland|09.|15darktech|09.|15org|08]

    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)