- Akku Tests und Balkonkraftwerk Speicher         
Ergebnis 1 bis 2 von 2

Thema: logische Operatoren

  1. #1
    Erfahrener Benutzer Robotik Einstein
    Registriert seit
    29.01.2004
    Beiträge
    2.441

    logische Operatoren

    Anzeige

    Powerstation Test
    Gibts bei Bascom auch logische Operatoren wie AND und OR?

    Kann mir eigentlich kaum vorstellen, dass es sie nicht gibt, finde aber die richtige Syntax nicht.

    AND, OR, &&, &, ||, | versteht Bascom irgendwie nicht und in der Hilfe finde ich auch nichts.

  2. #2
    Gast
    Hallo,

    steht in den "Language Fundamentals" der Hilfe.

    **********************************************
    Logical Operators
    Logical operators perform tests on relations, bit manipulations, or Boolean operators.
    There four operators in Bascom are :


    Operator Meaning
    NOT Logical complement
    AND Conjunction
    OR Disjunction
    XOR Exclusive or

    It is possible to use logical operators to test bytes for a particular bit pattern.
    For example the AND operator can be used to mask all but one of the bits
    of a status byte, while OR can be used to merge two bytes to create a particular binary value.

    Example
    A = 63 And 19
    PRINT A
    A = 10 Or 9
    PRINT A

    Output
    19
    11

    ***********************************************
    Hoffe das hilft Dir.

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

MultiPlus Wechselrichter Insel und Nulleinspeisung Conrad