Recent posts

#1
General Discussion / New Photonic Chip: The Next Er...
Last post by Charles Pegge - Yesterday at 02:13:14 PM
Use of photonics in AI / low power /  massively parallel

Anastasi In Tech
25 apr 2024


#2
OxygenBasic Examples / Re: Oxygen and c++ expl
Last post by Frank Brübach - Yesterday at 11:58:03 AM
Good morning all

So far AS I have understood namespace Works in oxygen Like
This expl I have built

' -- oxygen basic
' -- example 1)

' global_var is in the global namespace
int global_var = 10

function outer_function() as integer

    '  outer_var is in the local namespace
    int outer_var = 20

        function inner_function() as integer
        'inner_var is in the nested local namespace
        int inner_var = 30

        print inner_var
        end function

    print outer_var

    inner_function()
end function

' print the value of the global variable
print global_var

' call the outer function and print local and nested local variables
outer_function()

'------------------- //
' -- example 2)
'
'NESTABLE NAMESPACES
int vic=99

namespace maria
  namespace tom
      int vic = 200
  end namespace
end namespace
'
print maria..tom..vic '200
print vic '99
#3
OxygenBasic Examples / Re: Oxygen and c++ expl
Last post by Charles Pegge - April 28, 2024, 07:37:25 PM
<< and >> are left-shift and right shift operators. They cannot be redefined though they can be overloaded for UDTs.

namespace symbols are expressed using double dot instead of double colon.

int i=1
namespace nn
int i=2
end namespace
print i "  " nn..i '1  2
#4
OxygenBasic Examples / Oxygen and c++ expl
Last post by Frank Brübach - April 28, 2024, 02:50:51 PM
Hi Charles

I played around with c++ and oxygen and tested this example  and its running Well
I have changed Oxygen.dll for this translation you can find in ZIP folder

Oxygen basic

' oxygen basic c++ translation, 28-04-2024, frank bruebach
'
' a) only "<<" and ">>" doesnt work (double quotation mark)
' b) and "namespace" doesnt know how to use, as function ?

' include <iostream>
' using namespace std;

int main {
const int myAge = 35;
'cout << "I am " << myAge <<

cout "I am "; '\n
cout myAge " years old ";
'cout str(myAge) " years old "; ' this line works too
return 0
}
' output 35 ' ok :-)

' changed oxygen.dll for it, see zip folder

New edit: result must be " I am 35 years old"
The example gives correct result Back I did another example too
#6
Code to share / Zstring example
Last post by Frank Brübach - April 27, 2024, 09:35:36 PM
Here an interesting zstring example

'
' zstring example: reduces text with value -1
'
dim as zstring myzText = "I love Ironman"

dim i as long
for i  = 0 to len(myzText) - 1
   print "zero based try: " + myzText[i]
next

for i  = 1 to len(myzText)
   print "one based try: " + myzText[i]
next

print "fine"
#7
Code to share / Array examples
Last post by Frank Brübach - April 27, 2024, 08:54:30 PM
Here are some Array examples

  ' -- arrays ----- 
  '
  '-- 1)
  '
  pim a(20) as pro = {2,4,6,8,10,12,14,16,18,20}

  a(20) = a(4) + a(6)
  printy a(20) '20

  '-- 2)
  '
  pim abc(100) as pro = {10,20,30,40,50,60,70,80,90,100}

  pindex 0
  printy abc[4] '50

  pindex 1
  printy abc[4] '40

  pindex 2
  printy abc[4] '30


  '-- 3)
  '
  pim tbo(100) as pro

  function abc(pro k,x)
    k*=2
    tbo[k]=x
  end function
 
  function abc(pro k) as pro
    k*=2
    return tbo[k]
  end function

  abc(5) = 2024
  printy abc(5) ' 2024

#8
Code to share / Class example freebasic Conver...
Last post by Frank Brübach - April 27, 2024, 03:22:15 PM
Hello again

Here a class Type example conversion 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

'--------------------------------------- //
#9
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.

#10
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