CHAIN seems to have some path limitations.

I have just run into a problem with a menu program that uses CHAIN to run individual animations. The program seems to run fine when loaded into the root directory of a hard drive--C:\ for example. However, when loaded onto the DESKTOP then some programs won't start--I get either a flashing of a DOS window and then remain in the menu program OR actually get a TrueBasic error that the file is not available for chaining and then the menu program quits. The 'proof' that this is a path length problem is that some files load, others (with longer titles) don't, and then on a machine where all files were chaining fine--I moved the whole folder structure into a new desktop folder (created with a long name) and then found none of the files would chain. HOWEVER, the menu program itself (and it loads graphic files from a folder) works fine even buried several more folders deep on the desktop. The Menu program (in fact all the program files) have been bound under 5.5b19 where the path limitation is at least 256 or more characters.)

I suspect that CHAIN may still have the 128 character path name limitation of older (Pre version 5.5x) True Basic programs. Not sure that there is a fix here since this is part of the main language, but it certainly is something everyone should be aware of!


Richard Tarara
Professor of Physics
Saint Mary's College
Notre Dame, Indiana


re: chain

In a much more recent post, it would seem that a possible reason for the problems I was having with CHAIN might be the (unknown to me before) fact that the path name for CHAIN can't have any spaces. This is, of course, a major problem. When one loads a program/folder the full path can easily pick up sub folders with spaces "Program Files" being an obvious example. If one then tried to CHAIN to a program residing in the PROGRAM FILES folder, then supposedly the chain command would not work. While I set my distributable programs to load directly into C:\ and any CHAIN calls are direct to programs in the folder I load, if that folder is moved to the desktop I can now see that despite capturing the full path and inserting that into the CHAIN call, problems can arise.

I would classify this as a major bug...severely limiting the use of CHAIN in distributed programs.

{obviously my initial analysis--length of path name--was wrong, with picking up spaces in the path name being the culprit.)


CHAIN and spaces

Hi Rick,

The editor itself ran into tis problem too. The way I resolved the problem was to pre-scan the CHAIN parameters to exchange all space characters from chr$(32) to chr$(31).

A similar routine in the chained to program reconverts chr$(31) to chr$(32) in order to recover the correct parameters. Obviously this only works for parameters and not for the pathname itself. I agree that this is a severe limitation on the use of CHAIN.