String kürzen

  • Hallo !


    Ich habe einen String der Beispielweise so aussieht (30,100).
    Jetzt möchte ich das nur die 1. Stelle nach dem Komma angezeigt wird. Probiert habe ich es mit Strleftback(String$,",") +","+ Mid(String$),",",1). Das klappt nicht.
    Kann mich jemand auf die richtige Spur bringen.


    Danke für jede Hilfe

  • Moijns!


    _nachKomma$ = StrRightBack(String$,",")
    _ersteKommaStelle$ = StrLeft(_nachKomma$,1)


    greetz
    RW

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl

  • mittels instr kannst du die position entdecken, und dann +1 dazu
    mitStelle = left( String$ , instr ( String$ , "," ) + 1 ) )


    Formel sprache ähnlich
    MitStelle := @Left( String , @Length(@Left(String,","))+ 1 );