Initializing help system before first use

publish

Purpose
Publish a symbol.
Synopsis
procedure publish(name:string, ref:string, external or structured)
Arguments
name 
Symbol to identify the object
ref 
A reference to an object of an external type, a structure ( e.g. set, list or array) or a string
Example
procedure mywritetext
   declarations
    mytxt: text               ! Local variable
  end-declarations

  publish("mypubtxt", mytxt)  ! Make mytxt public as 'mypubtxt'
  fcopy("publishtext.mos", "text:mypubtxt")
  writeln(mytxt)
  unpublish("mypubtxt")       ! Make mytxt private again
end-procedure
Further information
1. This procedure can be used to publish an object in the model dictionary such that it can be found by native code using name. Any entity (including local and private) can be exposed with this routine as long as it is of a referenced type (basically any type except integer, real and boolean). If a string variable is used the published symbol corresponds to a string constant initialized with the current value of this variable.
2. The provided name must be a valid identifier that is not yet being used by the model as symbol name (including entity and subroutine names). In case of error the procedure raises an IO error.
Related topics

© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.