Microsoft KB Archive/108095

{| = 10-Character Limit for Program or Procedure in FoxPro/Mac =
 * width="100%"|

ID: Q108095

2.50b MACINTOSH

The information in this article applies to:


 * Microsoft FoxPro for Macintosh, version 2.5b

SUMMARY
Only the first 10 characters of a program name or procedure name are considered significant when FoxPro for Macintosh searches for the program or procedure.

Procedure Names
Procedure names longer than 10 characters are allowed. However, FoxPro will truncate procedure names to 10 characters during its search for the procedure. If a procedure file contains two procedures that have the same 10 characters at the beginning of the procedure name, the procedure that appears first in alphabetical order will be used. The following steps will demonstrate this behavior.

1. From the File menu, choose New, and select Program. Click New.

2. Enter the following commands in the file:

PROCEDURE A1234567899876 WAIT WINDOW "First procedure in file - A1234567899876"

PROCEDURE A12345678912345 WAIT WINDOW "Second procedure in file - A12345678912345" 3. Save the file as LONGPROC.PRG. 4. Issue the following commands in the command window:

SET PROCEDURE TO longproc DO A1234567899876 5. Even though A1234567899876 appeared first in the procedure file, FoxPro uses the A1234567891235 procedure since its name is first in alphabetical order. The following wait window message is  displayed:

Second procedure in file - A12345678912345

Program Files
When a DO command is issued on a program with more than 10 characters in the filename and an extension is not specified, FoxPro looks for a 10-character filename and will produce an error. If the program name is enclosed in quotation marks, or a .PRG, .QPR, .SPR, or .MPR extension is added, FoxPro will search for a program name as long as specified. The following steps demonstrate this behavior:

1. From the File menu, choose New, select Program, and then click the New

button. Enter the following command in the file:

WAIT WINDOW "Hello, World" 2. From the File menu, choose Save. Type "ABCDEFGHIJKLMNOP" (without the  quotation marks) as the filename. Close the file. 3. In the Command window, type the following command: DO abcdefghijklmnop

FoxPro returns a "File 'abcdefghijklmnop' does not exist" error message. 4. In the Command window, type each of the following commands: DO 'abcdefghijklmnop' DO abcdefghijklmnop.prg

After each command, a wait window will be displayed: Additional reference words: FoxMac 2.50b capacity limit limitation errmsg err msg KBCategory: KBSubcategory: Keywords         : kberrmsg Version          : 2.50b Platform         : MACINTOSH
 * }