#184641 - 2008-01-17 12:22 PM
Problem with nummeric expression
|
GvMC
Fresh Scripter
Registered: 2006-05-31
Posts: 9
Loc: Germany, Munich
|
Hi, again I have strange problem, I´m not sure if I´m stupid or kix. I read a line from a file with format like 1,2,3,4,5,6,7,8,9,10,11, into an array, I split this array with delimiter ",", this works fine no problem.
$KSArray = Split ($KSAnzahl,",")
For Each $KSNR in $KSArray
Gosub Tauschen
Next
The variable $KSNR contains an Value from 1 to XX which I need in the subroutine called "Tauschen". In this Subroutine a UNC Path is created to connect to a network share.
:Tauschen
Select
Case $KSNR < 0
Return
Case $KSNR <= 9
$POS = "POS0"
Case $KSNR >= 10
$POS = "POS"
EndSelect
? $Site + $POS + $KSNR
Return
The Result is:
DEU04712POS01 DEU04712POS02 DEU04712POS03 DEU04712POS04 DEU04712POS05 DEU04712POS06 DEU04712POS07 DEU04712POS08 DEU04712POS09 All fine but:
DEU04712POS010 DEU04712POS011 DEU04712POS012 ....
Correct it should be DEU04712POS11 DEU04712POS12
I tried also with if clauses, i tried with duoble quotes nothing runs like i want.
What the hell I do wrong?!
|
|
Top
|
|
|
|
#184718 - 2008-01-21 11:25 AM
Re: Problem with nummeric expression
[Re: Glenn Barnas]
|
GvMC
Fresh Scripter
Registered: 2006-05-31
Posts: 9
Loc: Germany, Munich
|
Something I should care next time, I forgot that I get strings back. Thanks a lot!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 302 anonymous users online.
|
|
|