Author Topic: microB tokenizer  (Read 7895 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
Re: microB tokenizer
« Reply #15 on: May 12, 2020, 01:40:10 AM »
S
« Last Edit: July 10, 2020, 10:58:26 AM by Aurel »

Aurel

  • Guest
Re: microB tokenizer
« Reply #16 on: May 17, 2020, 10:24:24 PM »
-
« Last Edit: May 20, 2020, 02:25:34 PM by Aurel »

Aurel

  • Guest
Re: microB tokenizer
« Reply #17 on: May 20, 2020, 02:24:16 PM »
F
« Last Edit: July 10, 2020, 10:58:45 AM by Aurel »

Aurel

  • Guest
Re: microB tokenizer
« Reply #18 on: June 18, 2020, 01:23:00 PM »
F
« Last Edit: July 10, 2020, 10:59:02 AM by Aurel »

JRS

  • Guest
Re: microB tokenizer
« Reply #19 on: June 20, 2020, 05:48:39 PM »
I think it's suppose to look like this. Your fern may need watering.  ;D

250K iterations.

Have you thought about upgrading to Windows 10?

Code: Script BASIC
  1. ' ScriptBasic GFX - Fern
  2.  
  3. IMPORT gfx.sbi
  4.  
  5. s = gfx::Window(640,500,"ScriptBasic GFX Fern")
  6. RANDOMIZE(gfx::Time())
  7. SPLITA STRING(3,"0") BY "" TO xy
  8.  
  9. SUB Fern
  10. r = RND() % 100
  11. IF r <= 10 THEN
  12.    SPLIT "0,0,0,0.16,0,0" BY "," TO a,b,c,d,e,f
  13. ELSE IF r > 1 AND r <=86 THEN
  14.    SPLIT "0.85,0.04,-.04,0.85,0,1.60" BY "," TO a,b,c,d,e,f
  15. ELSE IF r > 86 AND r <=93 THEN
  16.    SPLIT "0.2,-.26,0.23,0.22,0,0.16" BY "," TO a,b,c,d,e,f
  17. ELSE
  18.    SPLIT "-.15,0.28,0.26,0.24,0,0.44" BY "," TO a,b,c,d,e,f
  19. END IF
  20. newx = ((a * xy[1]) + (b * xy[2]) + e)
  21. newy = ((c * xy[1]) + (d * xy[2]) + f)
  22. xy[1] = newx
  23. xy[2] = newy
  24. gfx::pixelRGBA s, INT(xy[1]*40+300), INT(-xy[2]*40+450), 0, 210, 55, 255
  25. END SUB
  26.  
  27. ts = gfx::Time()
  28. FOR w=1 TO 250000
  29.     Fern
  30. NEXT
  31. te = gfx::Time()
  32. gfx::stringColor s, 20, 15, "Time: " & FORMAT("%.4f",(te-ts)/1000) & " Seconds." & CHR(0), 0xffffffff
  33. gfx::Update
  34. WHILE gfx::KeyName(1) <> "+escape"
  35. WEND
  36. gfx::Close
  37.  
« Last Edit: June 23, 2020, 03:01:11 PM by John »

Aurel

  • Guest
Re: microB tokenizer
« Reply #20 on: June 21, 2020, 12:35:59 AM »
n
« Last Edit: July 10, 2020, 10:59:21 AM by Aurel »

JRS

  • Guest
Re: microB tokenizer
« Reply #21 on: June 21, 2020, 09:45:03 AM »
If your projects are not meant to be shared, running on deprecated OS platforms doesn't matter. Enjoy your hobby programming.