English
Forum

numbers Konvertieren

 

Julian
Schmidt
Hi,
i'd gladly one Zahlenfolge with Translate transform. (with Kommas)
and of course How follows:
0<->5
1<->6
2<->7
3<->8
4<->9

It should no letters (point and comma) transformed go, only numbers!
my zweiter Ansatz sees How follows from:
declare Ausgelesen$,filing$,filing2$,GesamterZahlenString$
Ausgelesen$=Input$("Bitte give tappt im dunkeln a Zahlenfolge ein","Eingabe","4")

whileloop Len(Ausgelesen$)

    filing$=Mid$(Ausgelesen$,&loop,1)
    filing2$=Translate$(filing$,"0","5")
    filing2$=Translate$(filing$,"1","6")
    filing2$=Translate$(filing$,"2","7")
    filing2$=Translate$(filing$,"3","8")
    filing2$=Translate$(filing$,"4","9")
    GesamterZahlenString$=GesamterZahlenString$+filing2$
    clear filing2$

Endwhile

MessageBox("Ergebnis: "+GesamterZahlenString$,"INFO",64)

How get one it os there the each characters korekt umgeformt becomes.

and itself no transformation again aufhebt (Translate$(filing$,"4","9") and thereafter Translate$(filing$,"9","4")).

LG

Julian57
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/08/11  
 




Nico
Madysa
You can first 0->A, 1->B, etc. transform, then 5->0, 6-1, etc. and to that Schluss A->5, B->6, etc.
 
Nico Madysa
04/08/11  
 




Julian
Schmidt
well then sees the code so from:
declare Ausgelesen$,filing$,filing2$,GesamterZahlenString$
Ausgelesen$=Input$("Bitte give tappt im dunkeln a Zahlenfolge ein","Eingabe","4")

whileloop Len(Ausgelesen$)

    filing$=Mid$(Ausgelesen$,&loop,1)
    filing2$=filing2$+Translate$(filing$,"0","A")
    filing2$=filing2$+Translate$(filing$,"1","B")
    filing2$=filing2$+Translate$(filing$,"2","C")
    filing2$=filing2$+Translate$(filing$,"3","D")
    filing2$=filing2$+Translate$(filing$,"4","E")
    filing2$=filing2$+Translate$(filing$,"5","A")
    filing2$=filing2$+Translate$(filing$,"6","1")
    filing2$=filing2$+Translate$(filing$,"7","2")
    filing2$=filing2$+Translate$(filing$,"8","3")
    filing2$=filing2$+Translate$(filing$,"9","4")
    filing2$=filing2$+Translate$(filing$,"0","5")
    filing2$=filing2$+Translate$(filing$,"A","5")
    filing2$=filing2$+Translate$(filing$,"B","6")
    filing2$=filing2$+Translate$(filing$,"C","7")
    filing2$=filing2$+Translate$(filing$,"D","8")
    filing2$=filing2$+Translate$(filing$,"E","9")
    GesamterZahlenString$=GesamterZahlenString$+filing2$
    clear filing2$

Endwhile

MessageBox("Ergebnis: "+GesamterZahlenString$,"INFO",64)

only How I get the funktionsfähig.
it go immernoch incorrect values outputted, must I a others variables-type take or what is correct there not?
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/08/11  
 




Nico
Madysa
simply everywhere the "Ablage2$+" Remove. the übersetzte must not drangehängt go, separate should the old supplant.
Oh, and you have with "Translate$(filing$,"5","A")" you vertippt.
 
Nico Madysa
04/08/11  
 




Julian
Schmidt
goes without "Ablage2$+" just as little
declare Ausgelesen$,filing$,filing2$,GesamterZahlenString$
Ausgelesen$=Input$("Bitte give tappt im dunkeln a Zahlenfolge ein","Eingabe","4")

whileloop Len(Ausgelesen$)

    filing$=Mid$(Ausgelesen$,&loop,1)
    filing2$=Translate$(filing$,"0","A")
    filing2$=Translate$(filing$,"1","B")
    filing2$=Translate$(filing$,"2","C")
    filing2$=Translate$(filing$,"3","D")
    filing2$=Translate$(filing$,"4","E")
    filing2$=Translate$(filing$,"5","0")
    filing2$=Translate$(filing$,"6","1")
    filing2$=Translate$(filing$,"7","2")
    filing2$=Translate$(filing$,"8","3")
    filing2$=Translate$(filing$,"9","4")
    filing2$=Translate$(filing$,"A","5")
    filing2$=Translate$(filing$,"B","6")
    filing2$=Translate$(filing$,"C","7")
    filing2$=Translate$(filing$,"D","8")
    filing2$=Translate$(filing$,"E","9")
    GesamterZahlenString$=GesamterZahlenString$+filing2$
    clear filing2$

Endwhile

MessageBox("Ergebnis: "+GesamterZahlenString$,"INFO",64)

Nico Madysa (08.04.11)
Oh, and you have with "Translate$(filing$,"5","A")" you vertippt.


thanks for Info
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/08/11  
 




Jörg
Sellmeyer
You setting indeed over ands over again The Originalzeichenfolge as Base one.

ex "B" must You filing2$=Translate$(filing2$,"1","B") use.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/08/11  
 



About a IF-terms I get it there.
declare Ausgelesen$,filing$,filing2$,GesamterZahlenString$
Ausgelesen$=Input$("Bitte give tappt im dunkeln a Zahlenfolge ein","Eingabe","4")

whileloop Len(Ausgelesen$)

    filing$=Mid$(Ausgelesen$,&loop,1)

    if filing$=0

        filing$=5

    elseif filing$=1

        filing$=6

    elseif filing$=2

        filing$=7

    elseif filing$=3

        filing$=8

    elseif filing$=4

        filing$=9

    elseif filing$=5

        filing$=0

    elseif filing$=6

        filing$=1

    elseif filing$=7

        filing$=2

    elseif filing$=8

        filing$=3

    elseif filing$=9

        filing$=4

    Endif

    GesamterZahlenString$=GesamterZahlenString$+filing$
    clear filing2$

Endwhile

MessageBox("Ergebnis: "+GesamterZahlenString$,"INFO",64)

goes the still plainer,eleganter solve?
 
04/08/11  
 




Julian
Schmidt
I have the whole now time the alphabet transfer.
it'll eachone character circa 13 letters in the Alphapet insane.
declare Ausgelesen$,filing$,filing2$,key$
Ausgelesen$=Input$("Bitte give tappt im dunkeln a Text ein","Eingabe","Mein Text")

whileloop Len(Ausgelesen$)

    filing$=Mid$(Ausgelesen$,&loop,1)
    filing2$=Translate$(filing$,"A","1")
    filing2$=Translate$(filing2$,"B","2")
    filing2$=Translate$(filing2$,"C","3")
    filing2$=Translate$(filing2$,"D","4")
    filing2$=Translate$(filing2$,"E","5")
    filing2$=Translate$(filing2$,"F","6")
    filing2$=Translate$(filing2$,"G","7")
    filing2$=Translate$(filing2$,"H","8")
    filing2$=Translate$(filing2$,"I","9")
    filing2$=Translate$(filing2$,"J","0")
    filing2$=Translate$(filing2$,"K","?")
    filing2$=Translate$(filing2$,"L","!")
    filing2$=Translate$(filing2$,"M","_")
    filing2$=Translate$(filing2$,"N","A")
    filing2$=Translate$(filing2$,"O","B")
    filing2$=Translate$(filing2$,"P","C")
    filing2$=Translate$(filing2$,"Q","D")
    filing2$=Translate$(filing2$,"R","E")
    filing2$=Translate$(filing2$,"S","F")
    filing2$=Translate$(filing2$,"T","G")
    filing2$=Translate$(filing2$,"U","H")
    filing2$=Translate$(filing2$,"V","I")
    filing2$=Translate$(filing2$,"W","J")
    filing2$=Translate$(filing2$,"X","K")
    filing2$=Translate$(filing2$,"Y","L")
    filing2$=Translate$(filing2$,"Z","M")
    filing2$=Translate$(filing2$,"1","N")
    filing2$=Translate$(filing2$,"2","O")
    filing2$=Translate$(filing2$,"3","P")
    filing2$=Translate$(filing2$,"4","Q")
    filing2$=Translate$(filing2$,"5","R")
    filing2$=Translate$(filing2$,"6","S")
    filing2$=Translate$(filing2$,"7","T")
    filing2$=Translate$(filing2$,"8","U")
    filing2$=Translate$(filing2$,"9","V")
    filing2$=Translate$(filing2$,"0","W")
    filing2$=Translate$(filing2$,"?","X")
    filing2$=Translate$(filing2$,"!","Y")
    filing2$=Translate$(filing2$,"_","Z")
    filing2$=Translate$(filing2$,"a","1")
    filing2$=Translate$(filing2$,"b","2")
    filing2$=Translate$(filing2$,"c","3")
    filing2$=Translate$(filing2$,"d","4")
    filing2$=Translate$(filing2$,"e","5")
    filing2$=Translate$(filing2$,"f","6")
    filing2$=Translate$(filing2$,"g","7")
    filing2$=Translate$(filing2$,"h","8")
    filing2$=Translate$(filing2$,"i","9")
    filing2$=Translate$(filing2$,"j","0")
    filing2$=Translate$(filing2$,"k","?")
    filing2$=Translate$(filing2$,"l","!")
    filing2$=Translate$(filing2$,"m","_")
    filing2$=Translate$(filing2$,"n","a")
    filing2$=Translate$(filing2$,"o","b")
    filing2$=Translate$(filing2$,"p","c")
    filing2$=Translate$(filing2$,"q","d")
    filing2$=Translate$(filing2$,"r","e")
    filing2$=Translate$(filing2$,"s","f")
    filing2$=Translate$(filing2$,"t","g")
    filing2$=Translate$(filing2$,"u","h")
    filing2$=Translate$(filing2$,"v","i")
    filing2$=Translate$(filing2$,"w","j")
    filing2$=Translate$(filing2$,"x","k")
    filing2$=Translate$(filing2$,"y","l")
    filing2$=Translate$(filing2$,"z","m")
    filing2$=Translate$(filing2$,"1","n")
    filing2$=Translate$(filing2$,"2","o")
    filing2$=Translate$(filing2$,"3","p")
    filing2$=Translate$(filing2$,"4","q")
    filing2$=Translate$(filing2$,"5","r")
    filing2$=Translate$(filing2$,"6","s")
    filing2$=Translate$(filing2$,"7","t")
    filing2$=Translate$(filing2$,"8","u")
    filing2$=Translate$(filing2$,"9","v")
    filing2$=Translate$(filing2$,"0","w")
    filing2$=Translate$(filing2$,"?","x")
    filing2$=Translate$(filing2$,"!","y")
    filing2$=Translate$(filing2$,"_","z")
    Key$=Key$+filing2$
    clear filing2$

Endwhile

MessageBox("Ergebnis: "+Key$,"INFO",64)

How can these work aud little Lines transfer?
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/08/11  
 



>> Can so a work in little Lines grasp?

whileloop chr$(daLoop)
 
04/08/11  
 




Andreas
Miethe


Untitled (08.04.11)
>> Can so a work in little Lines grasp?


only as Why stay
cls
Var Text$ = "1234567890ßABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Var Result$ = ""

Whileloop 1,Len(Text$)

    Result$ = Result$ + CHR$(Ord(Mid$(Text$,&loop,1))+13)

Endwhile

Print Result$
'and back
Text$ = ""

Whileloop 1,Len(Result$)

    Text$ = Text$ + CHR$(Ord(Mid$(Result$,&loop,1))-13)

Endwhile

Print Text$
Waitinput
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
04/09/11  
 




Julian
Schmidt
Ah Yes,
the sees well from

only come with manchen letters Sonderzeichen out.

LG

Julian57
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/09/11  
 




Andreas
Miethe


was too only as Why stay virtual.

here's another.
You can you Yes a or. two Ersatztabellen make and the Loop run.
CLS
Var ZuErsetzen$ = "ABCDEFGHIJ"
'becomes supplant through
Var substitute$     = "1234567890"
Var Pos& = 0
Var Result$ = ""
Var Test$ = "ABER HALLO"

Whileloop 1,Len(Test$)

    Pos& = Instr(Mid$(Test$,&loop,1),ZuErsetzen$)

    If Pos&

        Result$ = Result$ + Mid$(substitute$,Pos&,1)

    Else

        Result$ = Result$ + Mid$(Test$,&Loop,1)

    Endif

Endwhile

Print Result$
waitinput
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
04/09/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

13.113 Views

Untitledvor 0 min.
H.Brill08/04/23
Torsten Rümker06/03/15
Matthias Griesbach07/28/14
Pauli07/23/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie