@ -7,12 +7,21 @@ namespace SuperBASIC
{
static void Main ( string [ ] args )
{
Library lib = new Library ( ) ;
lib . AddFunction ( new Functions . Print ( ) , 1 , "PRINT" ) ;
lib . AddFunction ( new Functions . Multiply ( ) , 2 , "MULTIPLY" ) ;
Runtime r = new Runtime ( lib ) ;
r . OpenFile ( Directory . GetCurrentDirectory ( ) + "\\Test.basic" ) ;
r . Run ( ) ;
try
{
Library lib = new Library ( ) ;
lib . AddFunction ( new Functions . Print ( ) , 1 , "PRINT" ) ;
lib . AddFunction ( new Functions . Multiply ( ) , 2 , "MULTIPLY" ) ;
lib . AddFunction ( new Functions . Compare ( ) , 2 , "COMPARE" ) ;
lib . AddFunction ( new Functions . Pi ( ) , 0 , "PI" ) ;
lib . AddFunction ( new Functions . Euler ( ) , 0 , "EULER" ) ;
Runtime r = new Runtime ( lib ) ;
r . OpenFile ( Directory . GetCurrentDirectory ( ) + "\\Test.basic" ) ;
r . Run ( ) ;
} catch ( Parser . ParseException e )
{
Console . WriteLine ( $"Parsing failed:\n{e}" ) ;
}
}
}
}