different data types in ArcMap field calculator?

المشرف العام

Administrator
طاقم الإدارة
I would like to run the following pre logic code in the Arcmap field calculator:

def calc(f, fn, f1, f1n) f= str(f) f1 = str(f1) f = f.replace(" ", "") fn = fn.replace(" ", "") f1 = f1.replace(" ", "") f1n = f1n.replace(" ", "") if f+fn == f1+f1n: return "IDENTICAL" elif f == f1: return "Same no diff. street" elif fn == f1n return "diff no. same street" else return "different" where f and f1 are double and fn and f1n are string type fields. When I run it I get a syntax error for line 1. Could anyone help me spot it? This is the command

calc(!ADDRNMBR!, !ADDRNAME!, !ADDRNMBR_1!, !ADDRNAME_1!)

Thanks



أكثر...
 
أعلى