KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Obsolete commands
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: February 11, 2000

As 4th Dimension evolves, some commands become obsolete or superceded by a more efficient method or command. To make the transition from older versions smoothly, 4D has retained these commands, at least temporarily, to insure compatibility with older versions of 4D. The following are three commands that are current examples of this:
















SEARCH BY INDEX This command is still present in 4th Dimension for compatibility with 4D version 1. For any new programming, use the command QUERY.



WARNING: This command will disappear in future versions. Please do not use it.



SORT BY INDEX This command is still present in 4th Dimension for compatibility with 4D version 1. For any new programming, use the command ORDER BY.



WARNING: This command will disappear in future versions. Please do not use it.



ON SERIAL PORT CALL ON SERIAL PORT CALL (serialMethod{;process})



















Parameter Type Description
serialMethod String Method to be invoked
process String Process name



Description

This command has been retained for compatibility with 4th Dimension version 2. In most cases, it would be more efficient to use the RECEIVE BUFFER command.



ON SERIAL PORT CALL installs serialMethod as an interrupt method for managing serial port events in a separate process. The interrupt method is automatically called by 4th Dimension when a character enters the serial port buffer opened with SET CHANNEL. An empty string for serialMethod turns off serial port event handling. The optional process parameter names the process created by the ON SERIAL PORT CALL command. If process is prefixed with a dollar sign ($), process is a local process.

Since the interrupt method has been installed as a separate process, it runs concurrently with all other processes.

4th Dimension automatically calls the interrupt method when the serial port buffer contains one or more characters. If you decide to do nothing with the buffer contents, remember to clear the buffer contents by calling RECEIVE BUFFER. If you do not clear the buffer, 4th Dimension will call your installed method again and again.

WARNING: With 4th Dimension version 3, it is better to create your own process in which you can handle the serial port any way you want. From this process, you can receive or send data from and to the serial port, then communicate the data to other processes using interprocess communication. The use of ON SERIAL PORT CALL is discouraged.



When upgrading any database from older versions, the developer would be prudent to check to see if these commands are contained within it and modify them for future versions that may not support them.