"Illegal Function Call" SHELLing to More Than 124 Characters (33629)



The information in this article applies to:

  • Microsoft QuickBASIC 3.0, when used with:
    • the operating system: MS-DOS
  • Microsoft QuickBASIC 4.0, when used with:
    • the operating system: MS-DOS
  • Microsoft QuickBASIC 4.0b, when used with:
    • the operating system: MS-DOS
  • Microsoft QuickBASIC 4.5, when used with:
    • the operating system: MS-DOS
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0

This article was previously published under Q33629

SUMMARY

The SHELL statement takes a string expression of 124 characters or less. QuickBasic Versions 4.00 4.00b and 4.50 for MS-DOS, the Basic compiler Version 6.00 and 6.00b for MS-DOS or MS OS/2, or Microsoft Basic PDS Version 7.00 for MS OS/2 and MS-DOS give an "Illegal function call" error message for longer strings.

In QuickBasic Version 3.00, the same limitation applies; however, the string expression is truncated without any error message if it is longer than 124 characters. If the string is longer than 271 characters in QuickBasic Version 3.00, a "string space corrupt" error message results.

Modification Type:MinorLast Reviewed:1/8/2003
Keywords:KB33629