These are the parameters
First: 10
Second: 5.300000
Third: yes.txt
Forth: no.txt
Fifth: e:/index/
0 // current state 0 // next state 1 // 1 input message(s) 0:0.60,X1|X2|X3|X4|X5 // matchpar 0 // no. predicate 0 // 0 output ic(s) 0 // 0 output message(s) 1 // 1 action(s) 0,X1|X2|X3|X4|X5 // MATCHPAR matchpar.cThe ic accepts five parameters X1, X2, X3, X4 and X5. The IC Manager has thirty predefined paramters X0-X9, Y0-Y9, Z0-Z9. The letters X, Y and Z must be in upper-case, otherwise there will be an error message when you try to run te program. The corresponding action is 'a' and it is defined in the C program matchpar.c as follows:
/* a c function for my action*/ void matchpar(plist,f_func,active_ic) para_list* plist; f_type* f_func; active_index *active_ic; { printf(" < HTML > "); printf("These are the parameters"); printf(" < p > "); printf("First: %d", get_int_par(1,plist,active_ic)); printf(" < p > "); printf("Second: %f", get_float_par(2,plist,active_ic)); printf(" < p > "); printf("Third: %s", get_string_par(3,plist,active_ic)); printf(" < p > "); printf("Forth: %s", get_string_par(4, plist,active_ic)); printf(" < p > "); printf("Fifth: %s", get_string_par(5, plist,active_ic)); printf(" < p > "); printf(" < a href=\"inter.cgi?tao_name=main.taoml\" > Go Back < /a > "); printf(" < /HTML > "); }The above program illustrates how you can extract the five parameters X1, X2, X3, X4 and X5. Once the paramters are extracted, the program a() can perform whatever processing that is necessary. The action MATCHPAR, the program matchpar() and the file matchpar.c should have the same name.
At run time, the IC Manager will produce the following debugging information in a file called file.ic:
next available ic: 2 id: 1 ic type: master current state: 0 initial state: 0 max. time: 100 input list: 0 output list: 0 same ic: 0
The programs are in the directory bach: e:\Inetpub\wwwroot
The course materials are in the directory bach e:\index
BACK TO TOP | GROWING BOOK (PC) | SENTIENT MAP (PC) |