• how can this work?

    From dream master@21:1/163 to All on Thursday, October 06, 2016 03:37:00
    in var ok : boolan = false;write('What do you w
    ant to know? : '); str :=input(60,50,3,'');
    ok :=pos('island',str) <> 0; if ok then num := 11;
    it does not work but if i change <> to =0; every this is t
    rue. getting closer hmmmm .úùD
    ream Masterùú. øù
    úùøøùúùø DoRE!
    ACiDiC!Demonic[dreamland.darkt
    ech.org]
    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From Gryphon@21:1/120 to dream master on Thursday, October 06, 2016 08:58:00
    On 10/06/16, dream master said the following...

    in var ok : boolan = false;

    write('What do you want to know? : ');
    str :=input(60,50,3,'');
    ok :=pos('island',str) <> 0;
    if ok then num := 11;

    it does not work but if i change <> to =0;


    I don't think pos() works like that. Pos() returns an integer, not a boolean.

    var num,x: integer=0;
    x:=pos('island',lower(str))
    if x > 0 then num:=11

    "No matter where you go, there you are!" - Buckaroo Bonzai

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX (21:1/120)
  • From dream master@21:1/163 to Gryphon on Thursday, October 06, 2016 13:56:00
    On 10/06/16, Gryphon said the following...
    I don't think pos() works like that. Pos() returns an integer, not a boolean.
    var num,x: integer=0;
    x:=pos('island',lower(str))
    if x > 0 then num:=11

    yes it does. i got it to work oddly after i posted this..

    ok :=pos('island',lower(str)) <> 0;
    if ok then num := 11;

    in var

    ok : boolean = false;

    i am gonna change it to the word so

    island : boolean = false;

    island :=pos('island',lower(str)) <> 0;
    if island then num :=11;


    |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 A31 (Windows)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)