Hat jemand eine Erklärung warum folgendes Macro mit einer Konstanten als Parameter funktioniert und übergeben in ein
Int oder Long einen Fehler auswirft.
Line 13: Can't use any of the following operands with floats: <<, >>, &, |, !, %.
Code: Alles auswählen
#CSS_Yellow= $FF00FFFF
Define color.i; color.l
Macro Darken(color)
Color & $ff000000 + (Color & $ff0000) * 0.8 + (Color & $ff00) * 0.8 + (Color & $ff) * 0.8
;Int(Color & $ff000000 + Int((Color & $ff0000) * 0.8) + Int((Color & $ff00) * 0.8) + Int((Color & $ff) * 0.8))
EndMacro
Debug Darken(#CSS_Yellow); funktioniert mit Konstante!
color= #CSS_Yellow
Debug Darken(color); funktioniert nicht als Integer oder Long!PS:
Sorry, die zusätzliche Macro-Fehlermeldung hat mich reingelegt
Der Fehler geschieht auch in einer Funktion und als reine Berechnung mit Int oder Long:
Code: Alles auswählen
color1= #CSS_Yellow & $ff000000 + (#CSS_Yellow & $ff0000) * 0.8 + (#CSS_Yellow & $ff00) * 0.8 + (#CSS_Yellow & $ff) * 0.8Code: Alles auswählen
Color1= Color & $ff000000 + (Color & $ff0000) * 0.8 + (Color & $ff00) * 0.8 + (Color & $ff) * 0.8