ACE Question: 4.10SE for DOS
Posted in 1995
Topics: General Discussion
Hi, I am having a problem with some ACE coding when using multiple Boolian qualifiers to try and exclude some rows from a print statement. Why does the code below not work? That is, if the subscripted string is not equal to app, qc, rl, rel or jd then print, else do nothing. I checked all values returned by the custom function TEST_INFO() and even when the string does not satisfy the conditions, they still get printed. Eg. 1 For i = 1 to TCount do begin let str = TEST_INFO(test_name, "mne_list", i) let prntRes = 1 if ( ( str[1,3] <> "app" ) or ( str[1,2] <> "qc" ) or ( str[1,2] <> "rl" ) or ( str[1,3] <> "rel" ) or ( str[1,2] <> "jd" ) ) then begin print UPPER(test_name); print ascii 09; print str end end The code below is what I ended up doing instead. It works just fine but I am concerned about other sections of code similar to the one above which I cannot test for all possible scenarios. They may also fail in some situations? Have I missed something obvious? Filtering in the select is not an option. Eg. 2 For i = 1 to TCount do begin let str = TEST_INFO(test_name, "mne_list", i) let prntRes = 1 if ( str[1,3] = "app" ) then let prntRes = 0 if ( str[1,2] = "qc" ) then let prntRes = 0 if ( str[1,2] = "rl" ) then let prntRes = 0 if ( str[1,3] = "rel" ) then let prntRes = 0 if ( str[1,2] = "jd" ) then let prntRes = 0 if prntRes = 1 then begin print UPPER(test_name); print ascii 09; print str end end Thanks in advance. Stu -- ______________________________________________________________________ _ / \\._ _|_ _.._ o _ Stu Miller - Mineralogist \\_/| | |_(_|| |(_) internet: millers@ndm.gov.on.ca ____ _____ ___ e-mail: miller_s@torv05.ndm.gov.on.ca / ___| ____/ _ \\ voice: (705)670-5635 FAX:(705)670-3047 | | _| _|| | | | _ | |_| | |__| |_| | _ _ ._ o _ _ _ / _ ._ _|_ ._ _ \\____|_____\\___/ _>(/_| \\/ |(_(/__> \\_(/_| | |_ | (/_ Geoscience Laboratories Ministry of Northern Development & Mines 933 Ramsey Lake Road, Sudbury, Ontario, CANADA P3E 6B5 -----------------------------------------------------------------------