Jump to content
Private Messaging is activated - check "How to" on how to disable it ×

PCM Dezimaltrenner


---
 Share

Recommended Posts

Folgendes Problem:
Ich muss im Programm einen Wert eingeben lassen.
Leider geschieht es häufig das bei der Eingabe anstatt dem Dezimaltrenner "Punkt" das "Komma" benutzt wird, was zu Fehlern führt.
Gibt es eine Möglichkeit mit PCM Befehlen das Komma in einen Punkt zu wandeln oder zumindest eine falsche Eingabe zu blocken?

Vielen Dank Carsten
Link to comment
Share on other sites

Hallo Carsten,

kannst Du mit PCM so machen:
textVal="125,5"
textTofind=","
replaceWith = "."
textOutput=executeCode("'" + textVal + "' copyReplaceAll: '" + textTofind + "' with: '" + replaceWith + "'")
SG Florian
Link to comment
Share on other sites

Hallo Carsten,

das geht einfach:

vWert=inquireText()
if inStr(vWert, ",")>0 then
vPart1=strElement(1,",",vWert)
vPart2=strElement(2,",",vWert)
vWertNeu=val(vPart1+"."+vPart2)
endif


Gruß Jens
Link to comment
Share on other sites

 Share

×
×
  • Create New...