Results 1 to 6 of 6

Thread: OxygenBasic

  1. #1

    OxygenBasic

    new and nice version here
    https://github.com/Charles-Pegge/Oxy...asic050P10.zip

    click on the "..." besides 5.27 MB then download

    many nice OpenGl examples from simple to complex
    many other demos
    the forum is here:
    http://www.jose.it-berater.org/smffo...hp?board=154.0

  2. #2
    I've just updated thinBasic_Oxygen
    https://github.com/Charles-Pegge/Oxy...sic_Oxygen.zip


    @Eros
    The included examples folder has a selection of scripts which belong in /thinBasic/SampleScripts/Oxygen/ . Unfortunately the scripts in this folder are nearly all broken and obsolete. I think they should be removed entirely and replaced by the current examples.

  3. #3
    O2 now supports multidimensional arrays. To be compatible with thinBasic and PowerBasic it must use Column-major order for which there is a switch: #minormajor. Otherwise, the default is row-major as in C and FreeBasic: #majorminor

    
    uses "oxygen"
    
    
    'SHARED VARIABLES
    '================
    
    
    dim as string src
    dim as single v(4,4)
    '
    'OXYGENBASIC SECTION
    '===================
    src="
    #minormajor 'thinBasic and Powerbasic mode
    indexbase 1
    overlay single v(4,4)
    @v=#v 'link to host variable v
    dim as long w,x,y
    for y=1 to 4
      for x=1 to 4
        w++
        v(x,y)=w 'fill 1 to 16
      next
    next 
    "
    
    
    'COMPILE
    '=======
    
    
    o2_basic src
    if o2_errno then
      msgbox 0,o2_error
      stop
    else
      o2_exec
      'msgbox 0,"ok"
    end if
    
    
    
    
    'MAIN THINBASIC SECTION
    '======================
    
    
    'array Order: 1, 2, 3, 4
    msgbox 0,"Order: "+v(1,1)+", "+v(2,1)+", "+v(3,1)+", "+v(4,1)
    

  4. #4
    I've introduced a new command: o2_run, which is a combination of o2_basic and o2_exec. It simplifies the script and reports any compile errors directly.

    OxygenBasic/thinBasic_Oxygen.zip at master · Charles-Pegge/OxygenBasic (github.com)

    This is the above code using o2_run

    '02:01 15/10/2022
    
    
    uses "oxygen"
     
    'SHARED VARIABLES
    '================
     
    dim as single v(4,4)
    '
    'OXYGENBASIC SECTION
    '===================
    
    
    o2_run "              'combined o2_basic and o2_exec
    #minormajor           'thinBasic and Powerbasic mode
    indexbase 1           'lbound
    overlay single v(4,4) 'map for the array 
    @v=#v                 'link to host variable v location
    dim as long w,x,y
    for y=1 to 4
      for x=1 to 4
        w++
        v(x,y)=w 'fill 1 to 16
      next
    next
    "
    
    
    'MAIN THINBASIC SECTION
    '======================
     
    'array Order: 1, 2, 3, 4
    msgbox 0,"Order: "+v(1,1)+", "+v(2,1)+", "+v(3,1)+", "+v(4,1)
    
    Last edited by Charles Pegge; 15-10-2022 at 13:39.

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Ciao Charles,

    next week-end I will release a new thinBasic update.
    I will insert your latest Oxygen Basic release.

    Is it correct to take thinBasic_Oxygen.zip content for distribution for thinBasic?

    Thanks
    Eros
    Attached Images Attached Images
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    Yes Eros,

    I include key examples. I've also included RTL32.inc and also RTL64.inc so you can create 32 and 64 bit binaries.

    oxygen.dll has been brutally UPXed to 122kb

    I've just posted another update, so use the latest

Similar Threads

  1. Proposed Wide String (Unicode) support in OxygenBasic
    By Charles Pegge in forum O2h Compiler
    Replies: 2
    Last Post: 27-02-2011, 04:08

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •