Autor Beitrag
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Sa 02.11.02 17:56 
Hi,
ich habe von meinem Vater einen Pocket PC geschenkt bekommen, der voll auf Basic läuft. Nun wollte ich auf diesem "Rechner" eine XOR-Verschlüsslung realisieren. Leider gibt es in diesem Basic den Operator "XOR" nicht. Wie könnte der heißen?

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Di 05.11.02 21:37 
also XOR ist nicht ne idee von delphi.
XOR ist eine Binärlogik.
ich hab mal in meiner superauszubildenenberufsschulenformelsammlung unter basic geguckt und in den sprachelementen XOR als logischer operant gefunden.
:arrow: folgendes fanasievolles beispiel war beigegeben.
X XOR Y

der operanten XOR gibt es also in basic.
(wie in jeder anderen programmiersprache auch)

CU

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
Tante
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 41



BeitragVerfasst: Mi 06.11.02 12:48 
Hallo Maxk!

Du kannst statt XOR auch OR, AND und NOT verwenden. XOR ist ja nichts anderes als ein "exklusives entweder oder", also:

ausblenden Quelltext
1:
A xor B = (A and not B) or (B and not A)					


@ Patrick: Auch wenn es in Deiner tollen Formelsammlung steht: Es gibt xor nicht in jedem Basic-Dialekt.
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Mi 06.11.02 20:24 
sorry aber meine basic zeit is n bisschen sehr verstaubt (und ehrlichgesagt ich hab nie wirklich mich mit basic auseinandergesetzt).

ich ging davon aus das die sache was da drín steht allgemein stimmt

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
maxk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Do 07.11.02 10:51 
@Tante: Den Code werde ich mal testen - Danke

maxk

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.