Obsidean_VM/01-Documentation/Scripts Excel - VBA/Untitled.md

17 lines
392 B
Markdown
Raw Normal View History

2025-02-18 05:37:27 -03:00
```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
```