Jump to content

Wanted - List Classes Command


Recommended Posts

try this vs (bit crude, but does the job!)

He will not write the guides class.

Procedure TheClass;

VAR

n,a: LONGINT;

fn: STRING;

Mcl: DYNARRAY [] OF STRING;

BEGIN

n:=ClassNum;

a:=1;

ALLOCATE Mcl [1..n];

REPEAT

Mcl[a]:=ClassList(a);

a:=a+1;

UNTIL (a=n);

a:=1;

PutFile('Select the file','New File',fn);

Message(fn);

IF NOT DidCancel THEN REPEAT

WriteLn(Mcl[a]);

a:=a+1;

UNTIL (a=n);

Close('class.txt');

END;

Run(TheClass);

Link to comment

Yeah! And I've been thinking for a little while why the guides wouldn't show... the original script lists objects with a WHILE (<>NIL): I should be more careful.

The Close('class.txt') is wrong and should be replace by Close(fn).

The PutFile('Select the file','New File',fn); save the file as a text doc, but even adding the .txt ('New File.txt') the file still try to open on VW: Any idea why? is a bit annoying to try to check a list of groups of objects and, if I forget to "open with", get a error message and a new doc in VW.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...