Author Topic: Progress of the PluriBASIC implementation of Oxygen  (Read 5896 times)

0 Members and 1 Guest are viewing this topic.

Brian Alvarez

  • Guest
Progress of the PluriBASIC implementation of Oxygen
« on: May 02, 2018, 06:33:22 PM »
It now supports:

#PREFIX
WITH / END WITH
MACROS
FUNCTION, SUB, FASTPROC, CALLBACK
FOR/NEXT
DATA fields + READ$() + DATACOUNT.
GOTO, GOSUB, RETURN
IF / THEN / ELSE / ELSEIF /END IF (including single line IF blocks with multiple statements)
TYPE
DIM (partially)
REDIM (partially)
REDIM PRESERVE (partially)
RESET (partially)
LOCAL
STATIC
REGISTER

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #1 on: May 02, 2018, 06:37:10 PM »
STDOUT

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #2 on: May 02, 2018, 06:43:45 PM »
SELECT CASE / END SELECT as follows:

Code: [Select]
   SELECT CASE IntVar&
      CASE 1
      CASE 2
      CASE 3 TO 10
      CASE 11, 15, 21
      CASE ELSE
   END SELECT

SWITCH asfollows:

Code: [Select]
switch IntVar& {
    case 1 :
       break
    default:   // for the moment it doesnt support Oxygen's "case else", to be compliant with the standard.
}

JRS

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #3 on: May 02, 2018, 06:45:54 PM »
Outstanding Brian!

I'm taking a deep dive into PHP with an open source accounting package I'm working with.

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #4 on: May 02, 2018, 06:50:00 PM »
#INCLUDE ""
#INCLUDE ONCE ""
#INCLUDE THIS ONCE

#IF
#ELSEIF
#ELSE
#ENDIF
%DEF()

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #5 on: May 02, 2018, 07:01:18 PM »
DO / LOOP
WHILE / WEND

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #6 on: May 02, 2018, 07:28:06 PM »
Hexa0decimal values:
Code: [Select]
&HFFFFFF
Octal values:
Code: [Select]
&O123456
Binary values:
Code: [Select]
&B11010010

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #7 on: May 06, 2018, 01:37:53 PM »
UBOUND
LBOUND

JRS

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #8 on: May 06, 2018, 02:00:14 PM »
Cool!

When will you be asking for testing help?

Can I assume this will be both 32/64 bit?
« Last Edit: May 06, 2018, 08:40:08 PM by John »

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #9 on: May 06, 2018, 11:41:34 PM »
 Hello John, i will need testers later on. And yes, you can select between 32 bits and 64 bits with:

Code: [Select]
#COMPILER OXYGEN
#COMPILE EXE
#OPTIONS X32

and:

Code: [Select]
#COMPILER OXYGEN
#COMPILE EXE
#OPTIONS X64

Arnold

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen - Hello World
« Reply #10 on: October 03, 2018, 11:19:38 PM »
Hi Brian,

I found your message in the JRS forum: Hello World not firing.

In case you did not already find the answer: you forgot to call main().
For MSGBOX I would use the Winapi MessageBox function. So this would be my code:

Code: OxygenBasic
  1. 'Generated with PluriBASIC 6.0.74371.0
  2.  
  3. $ filename "hello_world.exe"
  4.  
  5. uses rtl64
  6.  
  7. 'uses corewin
  8. extern lib "user32.dll"
  9. ! MessageBox alias "MessageBoxA"  
  10. end extern
  11.  
  12.  
  13.  
  14. ' STARTS PLURIBASIC_INIT.BIN
  15.  
  16. ' Enter the stock code and functions here.
  17.  
  18. ' END OF PLURIBASIC_INIT.BIN
  19. ' STARTS MSGBOX.BIN
  20. FUNCTION MSGBOX(string sText, optional sys mOptions = 0, string sCaption = "") AS LONG
  21.   'mbox(sText)
  22.  MessageBox(null, sText, sCaption, mOptions)
  23. END FUNCTION
  24. ' END OF MSGBOX.BIN
  25. ' STARTS CALLBACKDATA.BIN
  26.  
  27. ' CALLBACK data
  28.  
  29. ' END OF CALLBACKDATA.BIN
  30. ' STARTS ENTRY_POINT.BIN
  31.  
  32. ' Enttry point code
  33. ' END OF ENTRY_POINT.BIN
  34.  
  35. ' Initializes various things in the script.
  36. FUNCTION PluriBASIC_Initialize() AS LONG
  37.  
  38. END FUNCTION
  39.  
  40. FUNCTION MAIN()
  41.    MSGBOX "hello world"
  42.    MSGBOX "GoodBye", 1, "Oxygenbasic"      'MB_OKCANCEL
  43. END FUNCTION
  44.  
  45. main()
  46.  


Mike Lobanovsky

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen - Hello World
« Reply #11 on: October 04, 2018, 12:53:15 AM »
Hi Roland,

Believe it or not but I'd just posted a similar message to Brian on the JRS forum -- before I came here and saw yours.

Hopefully he sees at least one of them on either forum. :)

Brian Alvarez

  • Guest
Re: Progress of the PluriBASIC implementation of Oxygen
« Reply #12 on: October 04, 2018, 11:13:50 AM »
Thanks Arnold, that indeed did the trick. :)