Update savehexpalette.bm

Option explicit conformity
This commit is contained in:
visionmercer 2022-08-29 10:55:55 +02:00 committed by GitHub
commit 401e24bb23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,11 @@
Sub SaveHexPalette (palettearray() As _Unsigned Long, filename As String)
ff = FreeFile
Open filename For Output As ff
For i = 0 To UBound(palettearray)
Print #ff, Right$(Hex$(palettearray(i)), 6);
If i < UBound(palettearray) Then Print #ff, ""
Next i
Close ff
End Sub
SUB SaveHexPalette (palettearray() AS _UNSIGNED LONG, filename AS STRING)
DIM ff AS LONG
DIM i AS LONG
ff = FREEFILE
OPEN filename FOR OUTPUT AS ff
FOR i = 0 TO UBOUND(palettearray)
PRINT #ff, RIGHT$(HEX$(palettearray(i)), 6);
IF i < UBOUND(palettearray) THEN PRINT #ff, ""
NEXT i
CLOSE ff
END SUB