TID: Mystic BBS 1.12 A48   
   MSGID: 1:129/215 6be1b525   
   REPLY: 1:317/3 62400224   
   TZUTC: -0400   
    BP> I might have to take a look at MS. Is the syntax similar to MPL? I guess   
    BP> if I took a look, I would be able to find out for myself... :)   
      
   Yes, it is Pascal-like and it has a lot of new language features too like   
   significantly better array handling, pointers, inheritance, overloading, no   
   string limitations, default parameters, 64 bit integers, etc.   
      
   You can use usage.mps and usage.ms in the latest A48 build to compare how   
   close the code is. I can also give you this too (but keep in mind I am not   
   100% sure I will use MS or not yet as the future MPL):   
      
   DIFFERENCES FROM TURBO/FREEPASCAL/MPL   
   =====================================   
      
   -- Boolean evaluations must be surrounded in parenthesis. This works the same   
    as Turbo/Free Pascal but different than MPL. In MPL allows multiple   
    evaluations to be defined without parenthesis like so:   
       
    MPL: If Deck[6].Card = CardJack or Deck[7].Card = CardJack Then   
      
    Mystic Script/Turbo/FreePascal:   
       
    If (Deck[6].Card = CardJack) or (Deck[7].Card = CardJack) Then   
      
   -- Function results must be assigned to "Result" not function name   
      
    Many Pascal compilers assign function results to the result variable not   
    the function name as in Turbo Pascal and MPL. For example:   
       
    TurboPascal/MPL:   
       
    Function MyFunction : Byte;   
    Begin   
    MyFunction := 10;   
    End;   
       
    FreePascal/Delphi/Mystic Script:   
       
    Function MyFunction : Byte;   
    Begin   
    Result := 10;   
    End;   
      
   -- Case statements "Else" does not have an "assumed Begin/End"   
      
    Turbo Pascal:   
      
    Case 1 of   
    2: WriteLn('2');   
    Else   
    // Single statement here or multiple statements in Turbo Pascal are okay   
      
    WriteLn('Case else');   
    WriteLn('Value is not 2');   
    End   
      
    Mystic Script:   
      
    Case 1 of   
    2: WriteLn('2');   
    Else   
    // Single statement here is okay, but you must enclose multiple statements   
    // in a begin/end like this:   
    Begin   
    WriteLn('Case else');   
    WriteLn('Value is not 2');   
    End;   
    End;   
      
   -- Case statements function with string values now:   
      
    MyString := 'Hello';   
      
    Case MyString of   
    'Hello': WriteLn('Hello to you!');   
    End;   
      
    This would cause a syntax error in FreePascal or TurboPascal but it works   
    in Mystic Script.   
      
   -- Semi-colons as statement enders are stricter in Mystic Script. MPL and   
    even Free Pascal is not as strict, so when porting code you may need to add   
    in some semicolons that you missed in your source code. You need to have   
    the period after End. in your main program block to signify the end of the   
    script, etc. There is no compilation so it is more strict with its syntax.   
      
   -- When defining default values for records or arrays they must be enclosed in   
    brackets ([]) instead of parenthesis.   
      
    Turbo Pascal:   
      
    MyArray : Array[1..4] of Byte = (1,2,3,4);   
       
    Mystic Script:   
      
    MyArray : Array[1..4] of Byte = [1,2,3,4];   
      
   -- Default values for a record do not require the element name. Values should   
    be defined in order of appearance within the record:   
      
    Type   
    MyRec = Record   
    A : Byte;   
    B : Byte;   
    End;   
      
    Turbo Pascal:   
      
    Var R: MyRec = (A:0; B:0);   
       
    Mystic Script:   
      
    Var R: MyRec = [0,0];   
      
   -- Multi-dimensional arrays are not declared with TurboPascal shortcuts:   
      
    Mystic Script:   
      
    Var Grid: Array[1..40] of Array[1..40] of Byte;   
       
    TurboPascal/MPL:   
       
    Var Grid: Array[1..40, 1..40] of Byte;   
      
   -- String types are not limited to 255 characters in Mystic Script.   
      
   -- Shutdown must abort script exection.   
      
    In MPL scripts will automatically terminal when a shutdown happens but this   
    convience comes at the expense of being able to handle a shutdown event such   
    as a user disconnection.   
       
    Mystic Script works similar to Mystic Python in that the shutdown event   
    must be tested for and your script must exit when it is True. This means   
    that all types of input that would stop the script must be enclosed in a   
    test for Shutdown. For example:   
       
    Repeat   
    Write ('Menu Prompt (Q/Quit): ');   
       
    Case (Readkey) of   
    'Q' : Break;   
    End;   
    Until Shutdown;   
       
    // We get here when the user presses Q or Shutdown is True   
      
   ... Help! I can't find the "ANY" key.   
      
   --- Mystic BBS v1.12 A48 2022/03/26 (Windows/64)   
    * Origin: Sector 7 * Mystic WHQ (1:129/215)   
   SEEN-BY: 1/123 15/0 90/1 103/705 105/81 106/201 120/340 616 123/10   
   SEEN-BY: 123/131 124/5016 129/215 305 330 331 153/757 7715 154/10   
   SEEN-BY: 154/30 40 50 700 203/0 218/700 840 220/90 221/0 1 6 242 360   
   SEEN-BY: 226/18 30 227/114 201 229/110 206 307 310 317 400 424 426   
   SEEN-BY: 229/428 452 550 664 700 230/0 240/5832 266/512 280/464 5003   
   SEEN-BY: 282/1038 292/854 8125 301/1 317/3 320/219 322/757 335/364   
   SEEN-BY: 341/66 234 342/200 396/45 423/81 460/58 633/280 712/848 770/1   
   SEEN-BY: 2320/105 2452/250 3634/12 4500/1   
   PATH: 129/215 154/10 280/464 221/1 6 229/664 426   
      
|