I can not use Built-in like C := Ord('A') ;
compiler return Msg 4 Syntax error Expected 'end' but '(' found
Built-In Chr/Swap/Ord....
Try :
Code: Select all
var k : byte
...
k:="A"; // is doing the job
-
- Posts: 60
- Joined: 22 Dec 2005 12:16
- Location: France (33)
-
- Posts: 60
- Joined: 22 Dec 2005 12:16
- Location: France (33)
It means that you called a non-existing function. In help it is described how to make your own functions:spinnumber wrote:zristic I had read help before post my question!
If write this line in my source file compiler retur error
PORTD := Swap(PORTB);
Error 3 Identifier 'Swap' was not declared
What is mean?
Code: Select all
function swap(input: byte): byte;
begin
result := input shl 4;
input := input shr 4;
result := result or input;
end;
-
- Posts: 60
- Joined: 22 Dec 2005 12:16
- Location: France (33)
In help I read this
Swap
Prototype function Swap(var arg : byte) : byte;
Returns Returns byte consisting of swapped nibbles.
Description Swaps higher nibble (bits <7..4>) and lower nibble (bits <3..0>) of byte-size parameter arg.
Requires Nothing.
Example PORTB := $F0;
PORTA := Swap(PORTB); // PORTA = PORTB = $0F
Where I can read other help?
Swap
Prototype function Swap(var arg : byte) : byte;
Returns Returns byte consisting of swapped nibbles.
Description Swaps higher nibble (bits <7..4>) and lower nibble (bits <3..0>) of byte-size parameter arg.
Requires Nothing.
Example PORTB := $F0;
PORTA := Swap(PORTB); // PORTA = PORTB = $0F
Where I can read other help?
Claude