From the beginning, we had always planned to incorporate a scripting (or macro) language into
FRED
because there are always calculations that are better performed as a script (i.e., complex, time consuming and repetitive calculations that are run overnight).
Another early decision was that the scripting language had to be a “real” language; in other words an existing, documented, common programming language. (We had observed the difficulties users had with software whose scripting languages were quirky, syntactically inconsistent, overly limited and/or difficult to use/understand.) Furthermore the scripting language had to support multidimensional arrays, file I/O, functions and subroutines, various data types, etc.
Yet another early decision was that the scripting language had to be compiled rather than interpreted. We wanted
FRED
scripts to run quickly and interpreted code is notorious for being slow! At the same time, we wanted the compiler operation to be completely transparent to the user.
Because it met all of our goals, we implemented a compiled BASIC scripting language into
FRED.
While not Visual BASIC™,
FRED's
compiler is virtually identical – it has a few useful extensions - and so almost any Visual BASIC reference will be applicable to
FRED. If you are like most engineers, you probably already know BASIC!
The BASIC compiler is fully integrated into
FRED and has access to all geometry, material, scatter model, raytrace controls and source database information, and all calculations and analyses. Users can open scripting editor windows in
FRED
that offer syntax checking and coloring, tool tips, debugging aids, etc. Output from scripts can be formatted for
FRED's
output window and/or written to either ASCII or binary output files.
Scripting is also available to create user-defined surfaces, coatings, scatter and material
properties.
Scripting a Formatted Calculation
What our Customers say about
FRED:
“FRED allows us to provide advanced analysis to our customers on an accelerated schedule.”