```pascal Public Function AdjustOffset(tipo As String, offset As Integer) As Integer Dim tipoMin As String tipoMin = LCase(Trim(tipo)) If tipoMin = "bool" Or tipoMin = "bit" Then AdjustOffset = (offset + 1) Mod 32 ElseIf tipoMin = "sint" Then AdjustOffset = (offset + 1) Mod 4 ElseIf tipoMin = "dint" Then AdjustOffset = 0 End If End Function ```