Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== CALCULATEX===== ^Published By^Date^Version^Knowledge Level^Keywords^ |Revelation Technologies|14 NOV 1989|2.X|EXPERT|CALCULATEX| ==== CALCULATEX ==== CALCULATEX is an external function that evaluates the specified field. <code> result = CALCULATEX(field, dict, id, record, mv) </code> ==== Using CALCULATEX ==== CALCULATEX differs from R/BASIC CALCULATE only in relieving the user of the necessity to save and restore the values of @DICT, @RECORD, and @ID. === field === Field contains the name of the dictionary field to evaluate. === dict === Dict contains the source dictionary file. === id === Put the record key of the source record in id. === record === Place the source record in record. === mv === Mv contains the value number of the source value in a multivalued field. This value should be 0 (zero) if the field is single-valued. ==== Values returned ==== CALCULATEX returns the result of evaluating field in the specified dictionary. ==== Correct Use of CALCULATEX ==== <code> /* The following code opens a file and its associated dictionary, then uses CALCULATEX to evaluate one multivalue in a field from SAMPLE_CUSTOMERS. */ DECLARE SUBROUTINE FSMSG, MSG DECLARE FUNCTION CALCULATEX file = "SAMPLE_CUSTOMERS" field = "CONTACT_NAME" dict = "DICT SAMPLE_CUSTOMERS" id = 6 mv = 2 OPEN file TO filevar ELSE FSMSG(); STOP OPEN dict TO @DICT ELSE FSMSG(); STOP READ @RECORD FROM filevar,id ELSE FSMSG(); STOP result = CALCULATEX(field, @DICT, id, @RECORD, mv) text = "Multivalue ":mv:" of the ":field:" field" text<<-1>> = "for record ":id:" evaluates to |":result MSG(text,"","","") </code> tips/revmedia/subs4.txt Last modified: 2024/06/19 20:20by 127.0.0.1