Recent posts

#1
Code to share / Re: Example Intro and HalProm...
Last post by Frank Brübach - Today at 03:22:15 PM
Hello again

Here a class Type example converdion from freebasic with cast to halProment

The freebasic Code you can find below my conversion

' convert a freebasic type class constructor to halProment Basic
'
class MyHeroeType
   bstring myString

method Constructor(string stParam)
   myString = stParam
   printy "construct"
end method

method destructor()
===================
'destroy bstrings
del mystring
printy "destruct!"
end method

method actmytype() as string
return mystring " "
end method

end class

new MyHeroeType sample("Superman")

Printy sample.actmytype

'-------------------------------------------- //
' freebasic code with cast
'
'' Type MyType
'' m_String As String
'' Declare Constructor(Byval sParam As String)
'' DECLARE OPERATOR CAST () BYREF AS STRING
'' End Type

'' Constructor MyType(Byval sParam As String)
'' m_String = sParam
'' End Constructor

'' OPERATOR MyType.CAST () BYREF AS STRING
''    OPERATOR = m_String
'' END OPERATOR

'' Dim sample As MyType = "enter man"
'' Print sample

'--------------------------------------- //
#2
We had that "old style" vaccination "ready to use" in germany.
It was forbidden to use it. That was when i realized there is something fishy going on.

#3
Why RNA

Dr. John Campbell
25 apr 2024


-->

Organisms

Dr. John Campbell
23 apr 2024


julian gillespie / australia / former barrister
An Australian Federal Court case has evidence to say they are GMOs
#4
Code to share / Print Substitute d and p
Last post by Frank Brübach - Yesterday at 05:31:02 PM
This is a Short Substitute for Print message

' short substitutes for print, d and p
' halProment Basic 26-04-2024

dim a as long
dim s,st as string

s = "Hello Batman"
st = "Hello Spiderman"

d s 'GO 'd = "druck" german language for print

p st 'GO ' p = "print" only an abbrevation
#5
Code to share / Array overlay example Translat...
Last post by Frank Brübach - Yesterday at 05:17:39 PM
Array overlay example Translation from Powerbasic to halProment Basic


'-- halProment Basic / Powerbasic, 25-04-2024
'-- ArrayOverlay old powerbasic expl

type DynamicArrays
    doubles as pro
    singles as pro
    longs   as pro
end type

function PBMAIN () as long
    static d  AS DynamicArrays
    static ds as pstring
    static ss as pstring
    static ls as pstring
    '----------------------
    'create space
    ds=string(&h08000,chr(0))
    ss=string(&h04000,chr(0))
    ls=string(&h04000,chr(0))
    '----------------------
    'store pointers
    d.doubles=strptr(ds)
    d.singles=strptr(ss)
    d.longs  =strptr(ls)
    '----------------------
    'overlay
    static double dn(&hfff) at d.doubles
    static single ss(&hfff) at d.singles
    static long   ll(&hfff) at d.longs
    dn(3000)=1234.5
    '-----------------------
    'redimensioning technique
    ds+=string(&h02000,chr(0))
    d.doubles=strptr(ds)
    '-----------------------
    printy dn(3000)
end function

pbmain() '1234.5
#6
OxygenBasic Examples / Re: Questionmark AS command
Last post by Frank Brübach - Yesterday at 05:15:30 PM
Thank you Charles I Had a similar Idea with simple "d" and "p"

Have built an example too
I tried ? and ?? as sys but doesn't Work but thats Not important for me :)

Regards Frank
#7
OxygenBasic Examples / Re: Questionmark AS command
Last post by Charles Pegge - Yesterday at 02:43:20 PM
Hi Frank,
'?' is used as a sys casting operator.

It cannot be redefined because it is not an alpha character. But you can do this using for example, an upper ascii £ (156) :

def £ print
£ "ok"

Also, you ccould use '?' as a suffix:

def p? print
p? "ok"
#8
OxygenBasic Examples / Questionmark AS command
Last post by Frank Brübach - Yesterday at 01:07:48 PM
Hi Charles have a little question
How to make a ? AS Print command in oxygen?

' how to make a ? as print command?
' I assume it's an reserved character in oxygen?

' declare ?(string st) as string
' ? = print

sub questionmark(args as string)
dim i as Integer
For i=0 To Len(args)-1
'Print Chr(args[i])
Next
return Print chr(args[i]) 'chr(9)+chr(13)+ 
End Sub

questionmark("hello world")
#10
Code to share / Type example
Last post by Frank Brübach - April 25, 2024, 03:57:52 PM
Simple Type example

'-- simple type example

type thor
  one  as byte
  two  as byte
  three as byte
  four  as byte
  five as string
end type

thor hammer
hammer.one=20 : hammer.two=40 : hammer.three=60 : hammer.four=80 : hammer.five="heroe"

print hammer.one
print hammer.two
print hammer.three
print hammer.four
print hammer.five