Author Topic: MY-BASIC  (Read 108470 times)

Offline AIR

  • BASIC Developer
  • Posts: 932
  • Coder
Re: MY-BASIC
« Reply #15 on: April 20, 2015, 07:29:37 PM »
struct mb_interpreter_t* bas = 0;

Creates a pointer to a mb_interpreter struct.  Intialized to 0.

MBAPI int mb_load_string(mb_interpreter_t* s, const char* l);

The signature/declaration of the function you're trying to call.  ALL OTHER FUNCTIONS ARE IRRELEVANT, THIS IS THE ONE GIVING YOU THE PROBLEM.


rtnval = mb_load_string(AT bas, pgm);

THIS IS HOW YOU ARE CALLING THE FUNCTION.

"AT bas" translates to "&bas".  So you are NOT passing an mb_interpreter POINTER to the function, you are essentially passing the first FIELD of the struct.

mb_assert(s && s->parsing_context); is telling you that the parameter you passed is INVALID.  BECAUSE it's NOT a Pointer to an mb_interpreter_t structure.

I leave it to you to fix now.

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #16 on: April 20, 2015, 07:52:18 PM »
I changed the code based on what I think you are saying. Okay, I give up and have to finish the project I'm working on to feed me. Can you just tell me where I'm screwing up and I'll remember it for next time.

Quote from: Tony
3. String pushing. Pelase git a updated revision and use 'mb_memdup' to generate a MY-BASIC managable string before pushing, you can find more information about this API in the ref doc pdf or search for it in https://github.com/paladin-t/my_basic/wiki/File-module for a demo usage.

Code: C
  1. static int _file_open(struct mb_interpreter_t* s, void** l) {
  2.     int result = MB_FUNC_OK;
  3.     FILE* fp = 0;
  4.     char* fn = 0;
  5.     char* fm = 0;
  6.  
  7.     mb_assert(s && l);
  8.  
  9.     mb_check(mb_attempt_open_bracket(s, l));
  10.  
  11.     mb_check(mb_pop_string(s, l, &fn));
  12.  
  13.     mb_check(mb_pop_string(s, l, &fm));
  14.  
  15.     mb_check(mb_attempt_close_bracket(s, l));
  16.  
  17. ....
  18.  

Code: C
  1. // MY-BASIC - Script BASIC extension module
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <stdarg.h>
  7. #include <ctype.h>
  8. #include <math.h>
  9. #include <time.h>
  10. #include "../../basext.h"
  11. #include "cbasic.h"
  12.  
  13. #include "my_basic.h"
  14.  
  15.  
  16. /****************************
  17.  Extension Module Functions
  18. ****************************/
  19.  
  20. besVERSION_NEGOTIATE
  21.   RETURN_FUNCTION((int)INTERFACE_VERSION);
  22. besEND
  23.  
  24. besSUB_START
  25.   DIM AS long PTR p;
  26.   besMODULEPOINTER = besALLOC(sizeof(long));
  27.   IF (besMODULEPOINTER EQ NULL) THEN_DO RETURN_FUNCTION(0);
  28.   p = (long PTR)besMODULEPOINTER;
  29.   RETURN_FUNCTION(0);
  30. besEND
  31.  
  32. besSUB_FINISH
  33.   DIM AS long PTR p;
  34.   p = (long PTR)besMODULEPOINTER;
  35.   IF (p EQ NULL) THEN_DO RETURN_FUNCTION(0);
  36.   RETURN_FUNCTION(0);
  37. besEND
  38.  
  39.  
  40. /********************
  41.  MY-BASIC Functions
  42. ********************/
  43.  
  44. besFUNCTION(mbas_init)
  45.   DIM AS int rtnval;
  46.   rtnval = mb_init();
  47.   besRETURN_LONG(rtnval);
  48. besEND
  49.  
  50. besFUNCTION(mbas_dispose)
  51.   DIM AS int rtnval;
  52.   rtnval = mb_dispose();
  53.   besRETURN_LONG(rtnval);
  54. besEND
  55.  
  56. besFUNCTION(mbas_open)
  57.   DIM AS struct mb_interpreter_t* bas = 0;
  58.   DIM AS int rtnval;
  59.   rtnval = mb_open(AT bas);
  60.   besRETURN_LONG(rtnval);
  61. besEND
  62.  
  63. besFUNCTION(mbas_close)
  64.   DIM AS struct mb_interpreter_t* bas;
  65.   DIM AS int rtnval;
  66.   rtnval = mb_close(bas);
  67.   besRETURN_LONG(rtnval);
  68. besEND
  69.  
  70. besFUNCTION(mbas_load_str)
  71.   DIM AS struct mb_interpreter_t* bas;
  72.   DIM AS const char PTR pgm;
  73.   DIM AS int rtnval;  
  74.   besARGUMENTS("z")
  75.     AT pgm
  76.   besARGEND
  77.   rtnval = mb_load_string(bas, pgm);
  78.   besRETURN_LONG(rtnval);
  79. besEND
  80.  
  81. besFUNCTION(mbas_run)
  82.   DIM AS struct mb_interpreter_t* bas;
  83.   DIM AS int rtnval;
  84.   rtnval = mb_run(bas);
  85.   besRETURN_LONG(rtnval);
  86. besEND
  87.  


jrs@laptop:~/sb/sb22/mybasic$ scriba testmb.sb
mb_init = OK
mb_open = OK
scriba: my_basic.c:3736: mb_load_string: Assertion `s && s->parsing_context' failed.
Aborted (core dumped)
jrs@laptop:~/sb/sb22/mybasic$

 
« Last Edit: April 20, 2015, 08:14:23 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #17 on: April 20, 2015, 08:29:25 PM »
I think the issue is that the string needs to be pushed to the structure before use.

Code: C
  1. int mb_push_string(struct mb_interpreter_t* s, void** l, char* val);
  2.  

Quote
This function pushes an argument of char* to an interpreter structure.

wangrenxin

  • Guest
Re: MY-BASIC
« Reply #18 on: April 20, 2015, 08:29:46 PM »
Hi all,

Glad to join here!

There are a lot of magic macros, where can I get header files including definitions of the macros?

WRX.

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #19 on: April 20, 2015, 08:33:42 PM »
Welcome Tony!

Attached is the C BASIC (cbasic.h #define's). Thanks for having a peek.

The Script BASIC extension API is defined in basext.h.
« Last Edit: April 20, 2015, 08:38:01 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 932
  • Coder
Re: MY-BASIC
« Reply #20 on: April 20, 2015, 08:52:31 PM »
Code: [Select]
#include "my_basic.c"

static struct mb_interpreter_t* bas = 0;

int main (int argc, char** argv) {
int retval;

mb_open(&bas);

retval = mb_load_string(bas,"print \"Hello, World!\n\"");

retval = mb_run(bas);


return retval;
}

Edit:  This is on my Mac.  Outputs "Hello, World!" as expected.
« Last Edit: April 20, 2015, 08:56:02 PM by AIR »

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #21 on: April 20, 2015, 09:03:03 PM »
Thanks AIR!

That is helpful. I thought mb_init() was the first call before any others were made. It doesn't seem to be needed in your example.

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #22 on: April 20, 2015, 09:10:40 PM »
Still no luck but now I'm getting a segmentation fault rather than a parse error.

Code: C
  1. // MY-BASIC - Script BASIC extension module
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <stdarg.h>
  7. #include <ctype.h>
  8. #include <math.h>
  9. #include <time.h>
  10. #include "../../basext.h"
  11. #include "cbasic.h"
  12.  
  13. #include "my_basic.h"
  14.  
  15.  
  16. /****************************
  17.  Extension Module Functions
  18. ****************************/
  19.  
  20. besVERSION_NEGOTIATE
  21.   RETURN_FUNCTION((int)INTERFACE_VERSION);
  22. besEND
  23.  
  24. besSUB_START
  25.   DIM AS long PTR p;
  26.   besMODULEPOINTER = besALLOC(sizeof(long));
  27.   IF (besMODULEPOINTER EQ NULL) THEN_DO RETURN_FUNCTION(0);
  28.   p = (long PTR)besMODULEPOINTER;
  29.   RETURN_FUNCTION(0);
  30. besEND
  31.  
  32. besSUB_FINISH
  33.   DIM AS long PTR p;
  34.   p = (long PTR)besMODULEPOINTER;
  35.   IF (p EQ NULL) THEN_DO RETURN_FUNCTION(0);
  36.   RETURN_FUNCTION(0);
  37. besEND
  38.  
  39.  
  40. /********************
  41.  MY-BASIC Functions
  42. ********************/
  43.  
  44. static struct mb_interpreter_t* bas = 0;
  45.  
  46. besFUNCTION(mbas_init)
  47.   DIM AS int rtnval;
  48.   rtnval = mb_init();
  49.   besRETURN_LONG(rtnval);
  50. besEND
  51.  
  52. besFUNCTION(mbas_dispose)
  53.   DIM AS int rtnval;
  54.   rtnval = mb_dispose();
  55.   besRETURN_LONG(rtnval);
  56. besEND
  57.  
  58. besFUNCTION(mbas_open)
  59.   DIM AS int rtnval;
  60.   rtnval = mb_open(AT bas);
  61.   besRETURN_LONG(rtnval);
  62. besEND
  63.  
  64. besFUNCTION(mbas_close)
  65.   DIM AS int rtnval;
  66.   rtnval = mb_close(bas);
  67.   besRETURN_LONG(rtnval);
  68. besEND
  69.  
  70. besFUNCTION(mbas_load_str)
  71.   DIM AS const char PTR pgm;
  72.   DIM AS int rtnval;  
  73.   besARGUMENTS("z")
  74.     AT pgm
  75.   besARGEND
  76.   rtnval = mb_load_string(bas, pgm);
  77.   besRETURN_LONG(rtnval);
  78. besEND
  79.  
  80. besFUNCTION(mbas_run)
  81.   DIM AS int rtnval;
  82.   rtnval = mb_run(bas);
  83.   besRETURN_LONG(rtnval);
  84. besEND
  85.  

Code: ScriptBasic
  1. DECLARE SUB mb_init ALIAS "mbas_init" LIB "mb"
  2. DECLARE SUB mb_dispose ALIAS "mbas_dispose" LIB "mb"
  3. DECLARE SUB mb_open ALIAS "mbas_open" LIB "mb"
  4. DECLARE SUB mb_close ALIAS "mbas_close" LIB "mb"
  5. DECLARE SUB mb_load_str ALIAS "mbas_load_str" LIB "mb"
  6. DECLARE SUB mb_run ALIAS "mbas_run" LIB "mb"
  7.  
  8. CONST MB_FUNC_OK = 0
  9.  
  10. ' IF mb_init() = MB_FUNC_OK THEN PRINT "mb_init = OK\n"
  11. IF mb_open() = MB_FUNC_OK THEN PRINT "mb_open = OK\n"
  12. mb_code = "PRINT \"Hello\"\n"
  13. mb_load_str(mb_code)
  14. mb_run
  15. mb_close
  16. mb_dispose
  17.  


jrs@laptop:~/sb/sb22/mybasic$ scriba testmb.sb
mb_open = OK
Segmentation fault (core dumped)
jrs@laptop:~/sb/sb22/mybasic$


Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #23 on: April 20, 2015, 09:27:24 PM »
It works!  Thanks AIR for your help tonight!

Code: C
  1. // MY-BASIC - Script BASIC extension module
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <stdarg.h>
  7. #include <ctype.h>
  8. #include <math.h>
  9. #include <time.h>
  10. #include "../../basext.h"
  11. #include "cbasic.h"
  12.  
  13. #include "my_basic.h"
  14.  
  15.  
  16. /****************************
  17.  Extension Module Functions
  18. ****************************/
  19.  
  20. besVERSION_NEGOTIATE
  21.   RETURN_FUNCTION((int)INTERFACE_VERSION);
  22. besEND
  23.  
  24. besSUB_START
  25.   DIM AS long PTR p;
  26.   besMODULEPOINTER = besALLOC(sizeof(long));
  27.   IF (besMODULEPOINTER EQ NULL) THEN_DO RETURN_FUNCTION(0);
  28.   p = (long PTR)besMODULEPOINTER;
  29.   RETURN_FUNCTION(0);
  30. besEND
  31.  
  32. besSUB_FINISH
  33.   DIM AS long PTR p;
  34.   p = (long PTR)besMODULEPOINTER;
  35.   IF (p EQ NULL) THEN_DO RETURN_FUNCTION(0);
  36.   RETURN_FUNCTION(0);
  37. besEND
  38.  
  39.  
  40. /********************
  41.  MY-BASIC Functions
  42. ********************/
  43.  
  44. static struct mb_interpreter_t* bas = 0;
  45.  
  46. besFUNCTION(mbas_init)
  47.   DIM AS int rtnval;
  48.   rtnval = mb_init();
  49.   besRETURN_LONG(rtnval);
  50. besEND
  51.  
  52. besFUNCTION(mbas_dispose)
  53.   DIM AS int rtnval;
  54.   rtnval = mb_dispose();
  55.   besRETURN_LONG(rtnval);
  56. besEND
  57.  
  58. besFUNCTION(mbas_open)
  59.   DIM AS int rtnval;
  60.   rtnval = mb_open(AT bas);
  61.   besRETURN_LONG(rtnval);
  62. besEND
  63.  
  64. besFUNCTION(mbas_close)
  65.   DIM AS int rtnval;
  66.   rtnval = mb_close(AT bas);
  67.   besRETURN_LONG(rtnval);
  68. besEND
  69.  
  70. besFUNCTION(mbas_load_str)
  71.   DIM AS const char PTR pgm;
  72.   DIM AS int rtnval;  
  73.   besARGUMENTS("z")
  74.     AT pgm
  75.   besARGEND
  76.   rtnval = mb_load_string(bas, pgm);
  77.   besRETURN_LONG(rtnval);
  78. besEND
  79.  
  80. besFUNCTION(mbas_run)
  81.   DIM AS int rtnval;
  82.   rtnval = mb_run(bas);
  83.   besRETURN_LONG(rtnval);
  84. besEND
  85.  

Code: ScriptBasic
  1. DECLARE SUB mb_init ALIAS "mbas_init" LIB "mb"
  2. DECLARE SUB mb_dispose ALIAS "mbas_dispose" LIB "mb"
  3. DECLARE SUB mb_open ALIAS "mbas_open" LIB "mb"
  4. DECLARE SUB mb_close ALIAS "mbas_close" LIB "mb"
  5. DECLARE SUB mb_load_str ALIAS "mbas_load_str" LIB "mb"
  6. DECLARE SUB mb_run ALIAS "mbas_run" LIB "mb"
  7.  
  8. mb_init()
  9. mb_open()
  10. mb_load_str("PRINT \"Hello MY-BASIC from Script BASIC\"\nPRINT\n")
  11. mb_run()
  12. mb_close()
  13. mb_dispose()
  14.  


jrs@laptop:~/sb/sb22/mybasic$ time scriba testmb.sb
Hello MY-BASIC from Script BASIC

real   0m0.004s
user   0m0.000s
sys   0m0.007s
jrs@laptop:~/sb/sb22/mybasic$



wangrenxin

  • Guest
Re: MY-BASIC
« Reply #24 on: April 20, 2015, 09:38:54 PM »
Interesting macros.

Value pop/push are only used to interactive between MB script and host, so you don't need to use mb_memdup or push anything for loading a script code.

Some idea might help:
mb_open/mb_close requires an 'mb_interpreter_t**' typed argument;
mb_load_string requires 'mb_interpreter_t*, const char*';
mb_run requires 'mb_interpreter_t*';

The main procedure should be somehow like:
Code: C
  1. mb_init
  2. mb_open
  3.         mb_load_str("something...")
  4.         mb_run
  5.        
  6.         mb_load_str("something else...")
  7.         mb_run
  8.        
  9.         ...
  10. mb_close
  11. mb_dispose
  12.  

Where bas is a valid mb_interpreter_t*. A null 'bas' triggered the assertion.

I figured out you got many 'DIM AS struct mb_interpreter_t* bas = 0;' in every besFUNCTION in early posts, the latest post using a global 'bas' should be ok. Calling mb_init at the beginning is necessary, and check if there's any more problem.

BTW. It should be 'rtnval = mb_close(AT bas);' in besFUNCTION(mbas_close).

wangrenxin

  • Guest
Re: MY-BASIC
« Reply #25 on: April 20, 2015, 09:43:15 PM »
Cheers :)

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #26 on: April 20, 2015, 10:10:32 PM »
Thanks for joining and mentoring the MY-BASIC project here on All BASIC. I hope to include the rest of the API in the extension module. Script BASIC now has TinyScheme, Perl and MY-BASIC extension modules to play with.  8)

BTW  - The mb_assert() function doesn't seem to be exported in the API version of MY-BASIC. I noticed the function in your File addition you mention on github.
« Last Edit: April 20, 2015, 10:19:24 PM by John »

wangrenxin

  • Guest
Re: MY-BASIC
« Reply #27 on: April 20, 2015, 10:33:30 PM »
The mb_assert() function doesn't seem to be exported in the API version of MY-BASIC.

It's not an actual function, it's a macro wrapper of the standard assert macro. It's defined in my_basic.h.

For more information about assertions, please see: http://en.wikipedia.org/wiki/Assertion_(software_development)

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #28 on: April 20, 2015, 11:29:25 PM »
Final clean up.

Code: C
  1. // MY-BASIC - Script BASIC extension module
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <stdarg.h>
  7. #include <ctype.h>
  8. #include <math.h>
  9. #include <time.h>
  10. #include "../../basext.h"
  11. #include "cbasic.h"
  12.  
  13. #include "my_basic.h"
  14.  
  15.  
  16. /****************************
  17.  Extension Module Functions
  18. ****************************/
  19.  
  20. besVERSION_NEGOTIATE
  21.   RETURN_FUNCTION((int)INTERFACE_VERSION);
  22. besEND
  23.  
  24. besSUB_START
  25.   DIM AS long PTR p;
  26.   besMODULEPOINTER = besALLOC(sizeof(long));
  27.   IF (besMODULEPOINTER EQ NULL) THEN_DO RETURN_FUNCTION(0);
  28.   p = (long PTR)besMODULEPOINTER;
  29.   RETURN_FUNCTION(0);
  30. besEND
  31.  
  32. besSUB_FINISH
  33.   DIM AS long PTR p;
  34.   p = (long PTR)besMODULEPOINTER;
  35.   IF (p EQ NULL) THEN_DO RETURN_FUNCTION(0);
  36.   RETURN_FUNCTION(0);
  37. besEND
  38.  
  39.  
  40. /********************
  41.  MY-BASIC Functions
  42. ********************/
  43.  
  44. static struct mb_interpreter_t* bas = 0;
  45.  
  46. besFUNCTION(mbas_init)
  47.   besRETURN_LONG(mb_init());
  48. besEND
  49.  
  50. besFUNCTION(mbas_dispose)
  51.   besRETURN_LONG(mb_dispose());
  52. besEND
  53.  
  54. besFUNCTION(mbas_open)
  55.   besRETURN_LONG(mb_open(AT bas));
  56. besEND
  57.  
  58. besFUNCTION(mbas_close)
  59.   besRETURN_LONG(mb_close(AT bas));
  60. besEND
  61.  
  62. besFUNCTION(mbas_load_str)
  63.   DIM AS const char PTR pgm;
  64.   besARGUMENTS("z")
  65.     AT pgm
  66.   besARGEND
  67.   besRETURN_LONG(mb_load_string(bas, pgm));
  68. besEND
  69.  
  70. besFUNCTION(mbas_run)
  71.   besRETURN_LONG(mb_run(bas));
  72. besEND
  73.  
« Last Edit: April 20, 2015, 11:41:55 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: MY-BASIC
« Reply #29 on: April 21, 2015, 08:42:00 AM »
Here is a Prime Number (benchmark) running under MY-BASIC as a Script BASIC extension module call.

Code: ScriptBasic
  1. DECLARE SUB mb_init ALIAS "mbas_init" LIB "mb"
  2. DECLARE SUB mb_dispose ALIAS "mbas_dispose" LIB "mb"
  3. DECLARE SUB mb_open ALIAS "mbas_open" LIB "mb"
  4. DECLARE SUB mb_close ALIAS "mbas_close" LIB "mb"
  5. DECLARE SUB mb_load_str ALIAS "mbas_load_str" LIB "mb"
  6. DECLARE SUB mb_run ALIAS "mbas_run" LIB "mb"
  7.  
  8. mb_init()
  9. mb_open()
  10.  
  11. mb_code = """
  12. FOR i = 3 TO 5000
  13.  f = 1
  14.  FOR j = 2 TO SQR(i)
  15.    IF i MOD j = 0 THEN f = 0 : EXIT
  16.  NEXT j
  17.  IF f = 1 THEN PRINT i," "
  18. NEXT i
  19. PRINT ,
  20. """
  21. mb_load_str(mb_code)
  22. mb_run()
  23. mb_close()
  24. mb_dispose()
  25.  


jrs@laptop:~/sb/sb22/mybasic$ time scriba mbprime.sb
3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 1009 1013 1019 1021 1031 1033 1039 1049 1051 1061 1063 1069 1087 1091 1093 1097 1103 1109 1117 1123 1129 1151 1153 1163 1171 1181 1187 1193 1201 1213 1217 1223 1229 1231 1237 1249 1259 1277 1279 1283 1289 1291 1297 1301 1303 1307 1319 1321 1327 1361 1367 1373 1381 1399 1409 1423 1427 1429 1433 1439 1447 1451 1453 1459 1471 1481 1483 1487 1489 1493 1499 1511 1523 1531 1543 1549 1553 1559 1567 1571 1579 1583 1597 1601 1607 1609 1613 1619 1621 1627 1637 1657 1663 1667 1669 1693 1697 1699 1709 1721 1723 1733 1741 1747 1753 1759 1777 1783 1787 1789 1801 1811 1823 1831 1847 1861 1867 1871 1873 1877 1879 1889 1901 1907 1913 1931 1933 1949 1951 1973 1979 1987 1993 1997 1999 2003 2011 2017 2027 2029 2039 2053 2063 2069 2081 2083 2087 2089 2099 2111 2113 2129 2131 2137 2141 2143 2153 2161 2179 2203 2207 2213 2221 2237 2239 2243 2251 2267 2269 2273 2281 2287 2293 2297 2309 2311 2333 2339 2341 2347 2351 2357 2371 2377 2381 2383 2389 2393 2399 2411 2417 2423 2437 2441 2447 2459 2467 2473 2477 2503 2521 2531 2539 2543 2549 2551 2557 2579 2591 2593 2609 2617 2621 2633 2647 2657 2659 2663 2671 2677 2683 2687 2689 2693 2699 2707 2711 2713 2719 2729 2731 2741 2749 2753 2767 2777 2789 2791 2797 2801 2803 2819 2833 2837 2843 2851 2857 2861 2879 2887 2897 2903 2909 2917 2927 2939 2953 2957 2963 2969 2971 2999 3001 3011 3019 3023 3037 3041 3049 3061 3067 3079 3083 3089 3109 3119 3121 3137 3163 3167 3169 3181 3187 3191 3203 3209 3217 3221 3229 3251 3253 3257 3259 3271 3299 3301 3307 3313 3319 3323 3329 3331 3343 3347 3359 3361 3371 3373 3389 3391 3407 3413 3433 3449 3457 3461 3463 3467 3469 3491 3499 3511 3517 3527 3529 3533 3539 3541 3547 3557 3559 3571 3581 3583 3593 3607 3613 3617 3623 3631 3637 3643 3659 3671 3673 3677 3691 3697 3701 3709 3719 3727 3733 3739 3761 3767 3769 3779 3793 3797 3803 3821 3823 3833 3847 3851 3853 3863 3877 3881 3889 3907 3911 3917 3919 3923 3929 3931 3943 3947 3967 3989 4001 4003 4007 4013 4019 4021 4027 4049 4051 4057 4073 4079 4091 4093 4099 4111 4127 4129 4133 4139 4153 4157 4159 4177 4201 4211 4217 4219 4229 4231 4241 4243 4253 4259 4261 4271 4273 4283 4289 4297 4327 4337 4339 4349 4357 4363 4373 4391 4397 4409 4421 4423 4441 4447 4451 4457 4463 4481 4483 4493 4507 4513 4517 4519 4523 4547 4549 4561 4567 4583 4591 4597 4603 4621 4637 4639 4643 4649 4651 4657 4663 4673 4679 4691 4703 4721 4723 4729 4733 4751 4759 4783 4787 4789 4793 4799 4801 4813 4817 4831 4861 4871 4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967 4969 4973 4987 4993 4999

real   0m0.145s
user   0m0.131s
sys   0m0.000s
jrs@laptop:~/sb/sb22/mybasic$

« Last Edit: April 21, 2015, 02:28:44 PM by John »