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
    55
    Posts
    8,665
    Blog Entries
    2
    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 Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Capture.jpg 
Views:	20 
Size:	101.5 KB 
ID:	10286  
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  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

Posting Permissions

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