Welcome!
cool Welcome PIC fans!
(to Pascal language fans too!)
Technical

Close General documentation

Close How to support PMP

Close Manuals

Close Tips

Other stuff

Close Documentation

Close How to support PMP

Close Off Topic

Close Today's favourites

Search




Downloads
Google

Tips - Using the dot notation

PMP allows the "dot" syntax that is similar to the standard Pascal syntax for record fields.

For example, consider the following syntax:

Var_A := Var_B.Bit_C;
if Var_B is not a record, PMP understands that we access to the Bit_C bit within Var_B.
Bit_C may be any literal, constant or boolean variable; if it is a boolean, the bit number of the boolean is used.
This syntax allows to access with the same bit definition to several variables that have the same bit positions (for example: a bit in PORTB has its equivalent in TRISB, and it may have an equivalent in an image variable).

The same method applies to the "set" notation:

Bit_C : boolean @ Var_C.1;
...
Var_A := [0, 4, Bit_C];

In this case, Bit_C is a boolean variable and has a bit number equal to 1, so the expression is equivalent to:

Var_A := B'00010011';


Creation date : 2007.05.10 2:41 PM
Last update : 2014.03.19 2:10 PM
Category : Tips
Page read 9748 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first to do so!


Connection...
 Members List Members : 140
Visits of the day: Visits of the day: (1)


seen seen


Your Username:

Password:

[ Password lost ? ]


[ Join us ]


Member online :  Member online :
     seen  
Anonymous online :  Anonymous online : 5

Total visits Total visits: 649599  

Most ever online
Most ever onlineTotal : 77

The 07/11/2014 @ 07:38


Webmaster - Infos

Ip: 54.90.158.245

Search




Friends News
Where are you from?

Sentence to think about :  Sometimes I'm quite happy that butter wire cutter was never taken up by computer specialists: mayhap it would no longer be compatible with all butters.  René Cougnenc, June 2, 1995.
^ Top ^