Recent posts

#1
Code to share / Type example
Last post by Frank Brübach - Today at 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
#2
Code to share / Simple macro
Last post by Frank Brübach - Today at 03:55:32 PM
Simple macro example

'-- simple macro
'
macro Adds(x,y)
  x + y
end macro

printy Adds("Hello my ", " Animal World")
printy Adds(2, 4) '6
#3
Code to share / Iteration expl
Last post by Frank Brübach - Today at 03:52:43 PM
Here a simple Iteration example

'-- string checksum example
 '
  dim abc,k as long
  dim st as string = "Avengers"

  abc=0
  for k=1 to len(st)
    abc+=asc(st,k)
  next

 print abc '827
 print st
 print k ' 9
#4
Code to share / Enumeration example
Last post by Frank Brübach - Today at 03:49:50 PM
Here an enumeration example

' enumerations
'
enum allmythings
   cars
   pets = 6
   paintings
   toys
   potatoes
   kings
   throne = 20
   sword
end enum

print paintings ' 7
print  sword  ' 21
#5
Code to share / Re: Example Intro and HalProm...
Last post by Frank Brübach - Today at 03:47:40 PM
Hello Johan.. No only a Part in c++, freebasic and oxygen .. I use next week another Notebook with 64 Bit and try to make a Test but I am Not Sure If thats running Well so far
Thx, Frank
#6
Code to share / Re: Example Intro and HalProm...
Last post by Johan Klassen - Today at 03:09:46 PM
hello Frank  :)
HalProment Basic is written in C# ?
can you make a 64-bit build ?
#8
Code to share / Re: Examples calculation + ari...
Last post by Frank Brübach - Yesterday at 10:12:26 PM
Next calculations and arithmetics

' Calculations

printy 1+2+3+4 '10

printy 1* 2* 3* 4 '24

printy sin(2* 4* 6* 8) '0.6636

printy cos(2* 4* 6* 8) '0.748

#9
Code to share / Re: Examples calculations
Last post by Frank Brübach - Yesterday at 10:10:05 PM
Next calculation example 2

long a,b,c,d
string st
a=20 : b=30 : c=40 : d=c*a
print d '800

st = "Hello result: " + str(d)
print st

pro a,b,c,d
pstring st
a=20 : b=30 : c=40 : d=b*a
printy d '600

st = "Hello result2: " + str(d)
printy st '600
#10
Code to share / Re: Examples Classes
Last post by Frank Brübach - Yesterday at 10:07:40 PM
Class examples 2x


'-- class example two times
'
'---------------------- //

class myZooClass

pApe as long

method ABC(value as long)
pApe = value
end method

method ABC() as long
method = pApe
end method

end class

'test it
dim zoo as myZooClass

zoo.ABC = 6
print zoo.ABC ' 6

'---------------------- //

class AnimalClass
tiger as long

method paw(claws as long)
tiger= claws
end method

method paw() as long
method = tiger
end method

end class

'test it
dim cat as AnimalClass

cat.paw = 5
print "catpaw " +cat.paw ' 5