Author Topic: PluriBASIC - Progress of the implementation for Oxygen  (Read 6917 times)

0 Members and 1 Guest are viewing this topic.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
PluriBASIC - Progress of the implementation for Oxygen
« on: November 19, 2018, 07:46:22 PM »
 I had to back off from programming for a while but i am starting to gain speed again, remembering
how i did all the stuff. Seems like the work from another person, i dont recall being this organized.

 Anyway, right now the supported language is getting richer, Oxygen is doing a nice job at compiling
64bit executables. The list of functions supported is growing every day, in the past days the following
functions got ready:

Code: [Select]
PARSE$()
STRREVERSE$()
LTRIM$()
RTRIM$()
TRIM$
UCASE$
LCASE$
HIBYT()
HIWRD()
HIINT() ' needs a fix
HIDWD()
LOBYT()
LOWRD()
LOINT() ' needs a fix
LODWD()
STR$() 
FORMAT$()
READ$()                   
DATACOUNT
DATA

A couple of the functions are a direct copy/paste of Charles functions, the rest had to be completely re-made
to be fully compatible. The hardest and biggest one was FORMAT$().

« Last Edit: November 20, 2018, 04:06:07 AM by Brian Alvarez »

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress November 19 2018
« Reply #1 on: November 19, 2018, 08:02:38 PM »

The HIXXX and LOXXX functions also support the HI and LO syntax, for example:

Code: [Select]
HI(BYTE, 9999)
and

Code: [Select]
LO(BYTE, 9999)

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress November 19 2018
« Reply #2 on: November 19, 2018, 09:57:27 PM »
REPLACE [ANY] occurence$ WITH replacement$ IN TargetString$

Completed.
« Last Edit: November 19, 2018, 10:04:33 PM by Brian Alvarez »

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress November 19 2018
« Reply #3 on: November 19, 2018, 10:56:33 PM »
INSTR([Position&, ] SourceString$, [ANY] TargetString$)

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #4 on: November 20, 2018, 07:04:34 AM »
MID$ (function)
MID$ (statement)

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #5 on: November 20, 2018, 07:39:49 AM »
ITERATE FOR

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #6 on: November 20, 2018, 07:50:20 AM »
ITERATE DO

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #7 on: November 20, 2018, 08:22:42 PM »
REMAIN$(InputString$, [ANY] Target$)
RETAIN$(InputString$, [ANY] Target$)
REMOVE$(InputString$, [ANY] Target$)

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #8 on: November 21, 2018, 07:28:55 AM »
CHR$(CharCode? [TO CharCode?] [, CharCode? [TO CharCode?]])

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #9 on: November 22, 2018, 02:04:43 AM »
DIALOG NEW [PIXELS, | UNITS,] hParent&, Caption$, [x&], [y&], width&, height& [, [style&] [, [extendedstyle&]]] [,] TO hDlg&
DIALOG SHOW [MODAL | MODELESS] hDlg& [[,] CALL CallbackModule[()]] [TO lResult&]

Complete... almost.

Still need to do the UNITS part, for now it only works with PIXELS.
Also the automatic centering of the dialog when no X or Y coordinates are provided needs to be done.
 

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #10 on: November 22, 2018, 05:33:33 AM »
CONTROL SEND hDlg&, ctlID&, Message&, wParam&, lParam& [TO lResult&]

Complete.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #11 on: November 22, 2018, 10:42:26 PM »
CONTROL ADD [CONTROL | CustomControl$], hParent&, ControlID&, Caption$, X&, Y&, Width&, Height&[, Style& [, extStyle&]] [CALL CallbackProc[()]]

Supported controls:

BUTTON
LABEL
TEXTBOX
COMBOBOX
CHECKBOX
OPTION


Working on the rest.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #12 on: November 23, 2018, 12:09:32 AM »
 Working great...

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #13 on: November 25, 2018, 09:31:33 PM »
DIALOG END hWnd& [, lResult&]

Complete.  ;D

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 170
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress of the implementation for Oxygen
« Reply #14 on: November 26, 2018, 05:28:25 AM »
DIM Arrayname([lBound& TO] lUpperBound& [, [lBound& TO] lUpperBound&]) [AS DATATYPE] [* Length&] [AT Address???]

Still need to do more tests, but it is mostly complete.

The Following DIM statements are valid:

Code: [Select]
DIM MyArray(-10 TO 10, 9, 5) AS STRING
DIM MyArray(-10 TO 10, 9, 5) AS STRING * 100
DIM MyArray(-10 TO 10, 9, 5) AS STRING AT Address???

The Following already work with these arrays:

LBOUND()
UBOUND()
STRPTR()

For Example:

Code: [Select]
Bound& = UBOUND(MyArray)
Bound& = UBOUND(MyArray())
Bound& = UBOUND(MyArray(1))

Address??? = STRPTR(Array(-10, 9, 11))

At the moment, these arrays have some known limitations:
  • They cannot be passed to external DLL's unless created with PluriBASIC.
  • They cannot be used with a different number of dimensions than initially dimensioned (artificial limit that will be removed soon, because in practice, they can)
  • They cannot have more than 3 dimensions (limit temporarily set because of a system glitch)
More limitations may apply, i will be discovering them as i test them.

REDIM and REDIM PRESERVE are also mostly ready, but still need a couple tweaks and testing.

Not bad for a "lazy BASIC programmer" that works full time ON SUNDAY without even getting paid, huh?