Jim, there are two approaches to take:

1: Create a function (has a return value) or a procedure (no return value)

Example function:
function is_cool( name : String ) : Boolean;
  begin
    Result := false;
   
    if ( name = 'FesterHead' ) then
      begin
        Result := true;
      end;
  end;

Functions are defined as name ( var:type [; var:type] ) : return_type;
The return value is called Result (case insensitive?) and needs to be 
the same data type as return type

Example procedure:
procedure festerhead_is_cool( name : String );
  begin
    WriteLn( 'FesterHead is cool!' );
  end;

Procedures are defined as name( var:type [; var:type] );

2: Create a secondary PAL and include it into the first one

PAL1.pal:
WriteLn( 'FesterHead is cool!' );

PAL2.pal:
WriteLn( 'Who is cool?' );
{$include 'full_and_complete_path_to\PAL1.pal'}

Running PAL2.pal the output would be:
Who is cool?
FesterHead is cool!


The Delphi include directive when used in PAL doesn't take too kindly to 
relative paths.
As always... Enjoy!

Steve Kunitzer
http://www.festerhead.com



Jim Priebe wrote:
> Hi,
>>
>> Does anyone know of a way to pass parameters to a PAL script? I have 
>> several scripts that are almost exactly the same except for a couple 
>> of key variables. I'd prefer to have just one.
>>
>> Jim
>>

Reply via email to