// // time: Wed Apr 9 15:33:27 1997 // // version: 3.1.1 (format), 3.1.4 (DX Beta) // // // // macro reference (direct): Factorial FactorialMacro.net include "FactorialMacro.net" // // MODULE main // // comment: This visual program uses the macro FactorialMacro. This macro may be found in samples/macros. You may load the macro before opening the visual program. Otherwise, it will be loaded automatically for you. // comment: // comment: Given a specified integer, the factorial is computed and displayed. // workspace: width = 284, height = 418 // layout: snap = 0, width = 50, height = 50, align = NN // macro main( ) -> ( ) { // // node Integer[1]: x = 77, y = 28, inputs = 11, label = Integer // input[1]: defaulting = 0, visible = 0, type = 32, value = "Integer_1" // input[3]: defaulting = 0, visible = 0, type = 1, value = 4 // input[4]: defaulting = 1, visible = 0, type = 1, value = 0 // input[5]: defaulting = 1, visible = 0, type = 1, value = 1 // input[6]: defaulting = 1, visible = 0, type = 1, value = 10 // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.0 // input[9]: defaulting = 1, visible = 0, type = 1, value = 0 // output[1]: visible = 1, type = 1, value = 4 // // // node Factorial[1]: x = 217, y = 139, inputs = 1, label = Factorial // main_Factorial_1_out_1 = Factorial( main_Integer_1_out_1 ) [instance: 1, cache: 1]; // // node Format[1]: x = 162, y = 239, inputs = 3, label = Format // input[1]: defaulting = 0, visible = 1, type = 32, value = "Factorial of %d is %d" // main_Format_1_out_1 = Format( main_Format_1_in_1, main_Integer_1_out_1, main_Factorial_1_out_1 ) [instance: 1, cache: 1]; // // node Message[1]: x = 160, y = 356, inputs = 3, label = Message // input[3]: defaulting = 0, visible = 1, type = 3, value = 1 // Message( main_Format_1_out_1, main_Message_1_in_2, main_Message_1_in_3 ) [instance: 1, cache: 1]; // network: end of macro body } main_Integer_1_in_1 = "Integer_1"; main_Integer_1_in_2 = NULL; main_Integer_1_in_3 = 4 ; main_Integer_1_in_4 = NULL; main_Integer_1_in_5 = NULL; main_Integer_1_in_6 = NULL; main_Integer_1_in_7 = NULL; main_Integer_1_in_8 = NULL; main_Integer_1_in_9 = NULL; main_Integer_1_in_10 = NULL; main_Integer_1_in_11 = NULL; main_Integer_1_out_1 = 4 ; main_Factorial_1_out_1 = NULL; main_Format_1_in_1 = "Factorial of %d is %d"; main_Format_1_out_1 = NULL; main_Message_1_in_2 = NULL; main_Message_1_in_3 = 1; Executive("product version 3 1 4"); $sync main();