def valueWritePreprocessor(valueString, replaceParamsFile=None):
    if type(valueString) is bool:
        log.warning("Only numerical variable types can be handled by the valueReadPreprocessor function.")
        return valueString
    variableString = valueString
    if replaceParamsFile is not None:
        if variableString == REPLACE_NO_VALUE:
            variableString = '[NO_VARIABLE]'
        else:
            try:
                number = int(valueString)
                if number < 0:
                    parameterID = number * -1
                    for targetParam in replaceParamsFile.targetParameters:
                        if targetParam.id == parameterID:
                            variableString = targetParam.targetVariable
                            break
            except:
                pass
    return variableString