Code: Alles auswählen
If FindString(text$,"*",1)<>0
pos=FindString(text$,"*",1)
zahl1$=Left(text$,pos-1)
zahl2$=Right(text$,Len(text$)-pos+1)
zahl=Val(zahl1$)*ValF(zahl2$)
text$=StrF(zahl)
EndIf
Code: Alles auswählen
If FindString(text$,"*",1)<>0
pos=FindString(text$,"*",1)
zahl1$=Left(text$,pos-1)
zahl2$=Right(text$,Len(text$)-pos+1)
zahl=Val(zahl1$)*ValF(zahl2$)
text$=StrF(zahl)
EndIf
Code: Alles auswählen
Debug zahl1$
Debug zahl2$
Code: Alles auswählen
pos=FindString(text$,"*",1)
Code: Alles auswählen
pos=FindString(text$,"*",0)
Die bei FindString() anzugebende Position beginnt immer mit 1.PureBasic4.0 hat geschrieben:ich würde sagen, [...]
Code: Alles auswählen
Debug zahl1$
Debug zahl2$
Code: Alles auswählen
Macro Happy
;-)
EndMacro
Happy End
Code: Alles auswählen
Macro Happy
;-)
EndMacro
Happy End