From 401e24bb236c5f668ae9f7b5c2b5ca6d75193384 Mon Sep 17 00:00:00 2001 From: visionmercer <62051836+visionmercer@users.noreply.github.com> Date: Mon, 29 Aug 2022 10:55:55 +0200 Subject: [PATCH] Update savehexpalette.bm Option explicit conformity --- savehexpalette.bm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/savehexpalette.bm b/savehexpalette.bm index d9c492c..3d2f77a 100644 --- a/savehexpalette.bm +++ b/savehexpalette.bm @@ -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