' 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
' 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
'
'poba.inc
'
'-------------- //
def msgbox mbox
pro a
if not a then
call pbmain()
end if
' -- 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
' -> 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
' --> 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
Page created in 0.122 seconds with 12 queries.