online 1
gast (50)

/ Forum / Anwendungen(Java,C++...)

Anwendungen(Java,C++...)Anwendungen(Java,C++...)

Fragevon Schamhorst vom 16.12.2019, 13:21 Options

Buchstaben in Dual/binär system übersetzen

Hallo, ich habe mal folgendes vor:
ich würde gern eine kleine Batchdatei basteln, welche textfiles, wo buchstaben drinnen stehen in dualsystembuchstaben umwandelt und in ein andere textfile reinscheribt......so sieht es bei mir derzeit aus
@echo off
echo translates >translates.txt
:1
echo %x% >>translates.txt
set /p z=:
if %z% == a (
set "x=1100001"
echo 1100001
goto 1
)
if %z% == b (
echo 1100010
set "x=1100010"
goto 1
)
if %z% == c (
echo 1100011
set "x=1100011"
goto 1
)
if %z% == d (
echo 1100100
set "x=1100100"
goto 1
)
if %z% == e (
echo 1100101
set "x=1100101"
goto 1
)
if %z% == f (
echo 1100110
set "x=1100110"
goto 1
)
if %z% == g (
echo 1100111
set "x=1100111"
goto 1
)
if %z% == h (
echo 1101000
set "x=1101000"
goto 1
)
if %z% == i (
echo 1101001
set "x=1101001"
goto 1
)
if %z% == j (
echo 1101010
set "x=1101010"
goto 1
)
if %z% == k (
echo 1101011
set "x=1101011"
goto 1
)
if %z% == l (
echo 1101100
set "x=1101100"
goto 1
)
if %z% == m (
echo 1101101
set "x=1101101"
goto 1
)
if %z% == n (
echo 1101110
set "x=1101110"
goto 1
)
if %z% == o (
echo 1101111
set "x=1101111"
goto 1
)
if %z% == p (
echo 1110000
set "x=1110000"
goto 1
)
if %z% == q (
echo 1110001
set "x=1110001"
goto 1
)
if %z% == r (
echo 1110010
set "x=1110010"
goto 1
)
if %z% == s (
echo 1110011
set "x=1110011"
goto 1
)
if %z% == t (
echo 1110100
set "x=1110100"
goto 1
)
if %z% == u (
echo 1110101
set "x=1110101"
goto 1
)
if %z% == v (
echo 1110110
set "x=1110110"
goto 1
)
if %z% == w (
echo 1110111
set "x=1110110"
goto 1
)
if %z% == x (
echo 1111000
set "x=1111000"
goto 1
)
if %z% == y (
echo 1111001
set "x=1111001"
goto 1
)
if %z% == z (
echo 1111010
set "x=1111010"
goto 1
)




man muss jeden muchstaben einzeln eintippen
geht das auch, dass ein textfile eingelesen wird und dann übersetzt wird?
......
ist das auch andersrum möglich?
Gruß Fabian


Antwort schreiben

Antwort 1 von KJG17 vom 16.12.2019, 13:53 Options

Hallo Fabian,

falls es dir was hilft, hier --> Ein Beispiel, wie man das mit PHP realisieren kann.

Gruß
Kalle

Antwort 2 von Schamhorst vom 16.12.2019, 14:09 Options

danke erstmal für deine antwort aba ich komme mit dem php code iwie nich zurecht...

Antwort 3 von PcDock vom 16.12.2019, 14:17 Options

Hi,

1. wieso machst du das nicht in Basic oder QuickBasic.?


PcDock

Hardware lebt und ist eigenständig

Antwort 4 von Schamhorst vom 16.12.2019, 15:39 Options

nja, quick basic hab ich en bissl ahnung, aber selbst da hab ich keine ahnung, wie ich das umsetzen könnte
Gruß fabian

Antwort 5 von Schamhorst vom 16.12.2019, 15:43 Options

oder kann mir jemand erklären, wie ich den php code von der seite umsetzen kann?
ich habe eine datei namens bin.php erstellt und da den code reinkopiert. eine weitere datei namens test.html
hochgeladen-->url=http://schamhorst.sc.ohost.de/test.html]Ergebnis[/url]
Gruß Fabian

  • *Threadedit* 15:44:40
    Admininfo: achte bei Links bitte auf unsere Formatierungshilfe oder nutze das SNTool
  • Antwort 6 von Schamhorst vom 16.12.2019, 15:44 Options

    Linkkorrektur....
    gruß Fabian

    Antwort 7 von Schamhorst vom 16.12.2019, 15:47 Options

    hat sich erledigt.....ich stell mich manchmal aba einfach nur dumm an.....man muss einfach nur alles in eine datei reinpacken,,,,

    Ähnliche Themen

    An unsre türkischen Mitmenschen...bitte übersetzen :-)
    Maladeite  09.06.2007 - 155 Hits -

    buchstaben entfernen
    adrian1  22.08.2007 - 63 Hits - 4 Antworten

    Excel2007: Umwandlung Buchstaben - Zahlen
    FloXYZ  10.09.2007 - 136 Hits - 1 Antwort

    Muss ich jede Anwendung in meinem Dual-Boot System (xp und vista) 2mal installieren?
    nichweiterwisser  02.02.2008 - 61 Hits - 2 Antworten

    Hinweis

    Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

    Neue Einträge

    Version: supportware 1.9.150 / 10.06.2022, Startzeit:Thu Jan 8 21:07:44 2026