Recent posts

#1
OxygenBasic Examples / Cast example
Last post by Frank Brübach - Today at 01:53:37 PM
I dont know If there's any Cast example for oxygen but I noticed its Working perfect with sbyte

'' cast example (freebasic) and oxygen translation
''
uses console

sbyte sb 'signed byte
sb=32.2
print " 32.2 "+sb ' result 32


'' freebasic
'' Print Cast( Byte, &h0080 ) '-128 ''

'' oxygen
''
sb=byte(&h0080)
print " byte ="+sb ' result: -128


'' will print 3 because the floating-point value will be converted to an Integer
'' (this Casting operator is equivalent to using CInt)
''
'' Print Cast( Integer, 3.1 ) '3

'' oxygen
''

sb=integer(3.1)
print " integer 3.1 =" + sb ' result: 3

wait
#2
OxygenBasic Examples / Unicode question
Last post by Frank Brübach - Today at 01:23:17 PM
Hello Charles..

How I can Display Chinese Letters in oxygen? In Oxide there are only to See ??? Three or more  Questionmarks

In my simple Texteditor it Shows correct Chinese Symbols

uses corewin

extern lib "User32.dll"
    ! CharUpper "CharUpperW"                        '1
    ! CharLower "CharLowerW"                        '1
    ! MessageBox            "MessageBoxW"           '1
end extern
     
    wstring tab=wchr(9)
    wstring sep

dim strx as string =" 你好吗 " '' chinese letters

mbox mid(**strx,2)

' unicode problem

" 你好吗 "
' translation: chinesisch: Nǐ hǎo ma
' english: hello how are you?
' german: "hallo wie gehts?"
 

#3
MEET A CANADIAN TEEN GIFTED WITH A SUPER-POWERED MEMORY | W5 INVESTIGATION

Official W5
24 mar 2024

#4
microA Interpreter / micro(A) progies
Last post by Zlatko Vid - Today at 10:41:26 AM
for testing..

'usr func test 3 /locals
mode 1 : wcolor 0,0,0 : fcolor 150,210,150
print 10,20,"usr func test_3 /locals in micro(A)" : swap

func mA(var res)
    var a,b,c
    a=20
    b=40
    c=a*b
    fcolor 250,210,150 : print 50,50,c : swap
endfn

'call fn mA()
mA()
#5
That would then be true for german politicians also.
But in real life that  is not the case.
Its just "Act as f you are ...".
#6
Code to share / Re: Reducing a Text
Last post by Frank Brübach - Yesterday at 07:24:10 PM
Array Reducing a Text for a String

' array reducing text for a string
'
pindex 0

Dim txt() as zstring = "Hello World " + Chr(0)
dim i as integer
 
For i = 0 to Len(txt)-2 ''Len(txt)-1 if pindex is not active
   
    p? txt(i) + Chr(txt(i))
Next

' output: hello world ello world llo world lo world o world
' output: world orld rld ld d 
#7
Code to share / Re: Powerbasic Looks a Like ex...
Last post by Frank Brübach - Yesterday at 05:44:46 PM
Powerbasic Looks a Like example with inc File

A new Update you can find below with all examples for Testing

If you have question about halProment or the halPromide24 (IDE) please ask :)

Regards, Frank

' poba looks like calculation, halProment, 2-6-24
'
''#COMPILE EXE
#DIMALL

include once "poba.inc"

FUNCTION PBMAIN() AS LONG
    LOCAL a,b,c AS LONG
    a=20
    b=40
    c=a*b
    MSGBOX "calculation test: "+str(c)  ' result 800
END FUNCTION

Include File
'
'poba.inc
'
'-------------- //
def msgbox mbox

pro a
if not a then
call pbmain()
end if
#8
Code to share / Re: Byte Array
Last post by Frank Brübach - Yesterday at 05:41:53 PM
A Byte Array examples

' -- byte array example
'
pim strsrc as pstring
strsrc = "Hello, Animal World!"

Dim byteArray() as byte at strptr(strsrc)

  pim i,j as pro
  pim s,t as pstring
  j=1
  s=space 600
  for i=1 to 20
    t=chr(9)+str(byteArray[i]) ":  " + chr(byteArray[i])
    mid (s,j)=t
    j+=len t
  next

  p? left s,j

#9
Code to share / Re: cByte
Last post by Frank Brübach - Yesterday at 05:39:24 PM
CByte example for riunding Numbers and Auto converting Strings

' -> cbyte example, rounded numbers or converting strings
' halProment
'
'dim cb as cbyte

cbyte cb
cb=45.2 ' 45
print cb

cb=72.6
print cb ' 73

cb="-72"
print cb ' -72

cb="-122.5"
print cb ' -123

cb=255
print cb '-1

cb=260
print cb '4

#10
Code to share / Re: EXE File create
Last post by Frank Brübach - Yesterday at 05:36:17 PM
Hello all.. much more to come with a new Update with my Last Post later

How to create an EXE File?

' --> atestcalc 2 example
' --> create an Exe file with halProment
' --> menu/compile/Run compiling 32 bit
'
#fily "atestcal.exe"

dim s,st as string
dim a,b,c,d,e as long
a=10
b=20
c=30
d=a*b
e=d*c

s= "hello batman " + str(d)
st= "hello superman " + str(e)

print s ' result 200
print st ' result 6000

'-------------------------- //
'
pstring s1,st1
pro a,b,c,d,e ' pim as a,b,c,d,e as long
a=10
b=20
c=30
d=a*b
e=d*c

s1 = "hello batman1 " + str(d)
st1= "hello superman1 " + str(e)

print s1 ' result 200
print st1 ' result 6000