I have a shared unit with serial communication protocol process, and in it's uses section there is a project dependent unit which defines aliases like this:
In theory that should let me use communication protocol in many projects running on different ports defined in that project dependent unit.
First I had a problem which could be simplified to this code snippet:
As you can see I have solved this problem with a workaround.
But then this showed up which I don't know how to solve:
Is there some workaround for using alias with WaitPipe()?
Code
alias
// Communication protocol will be on serial port 2
SerInpComm = SerInp2; // serial port alias
RxBufferComm = RxBuffer2; // serial buffer alias
// Communication protocol will be on serial port 2
SerInpComm = SerInp2; // serial port alias
RxBufferComm = RxBuffer2; // serial buffer alias
In theory that should let me use communication protocol in many projects running on different ports defined in that project dependent unit.
First I had a problem which could be simplified to this code snippet:
Code
MyStr := SerInp2 + SerInp2; // this works
MyStr := SerInpComm + SerInpComm; // doesn't compile
MyStr := char(SerInpComm) + char(SerInpComm); // workaround
MyStr := SerInpComm + SerInpComm; // doesn't compile
MyStr := char(SerInpComm) + char(SerInpComm); // workaround
But then this showed up which I don't know how to solve:
Code
if WaitPipe(RxBufferComm, COMM_TIMEOUT_TICKS) then // compilation error
Is there some workaround for using alias with WaitPipe()?