Discussion:
[xHarbour-developers] Bug in HB_Decode
FabioNery
2015-10-07 16:49:30 UTC
Permalink
Hi, the following sample returns error for hash parameter with default
parameter (fourth test)

PROCEDURE Main

LOCAL nChoice, hHash

nChoice := 2
? HB_Decode( nChoice, 1, "COM1", 2, "COM2", 3, "COM3", "NUL" ) //
result: COM2

nChoice := 4
? HB_Decode( nChoice, 1, "COM1", 2, "COM2", 3, "COM3", "NUL" ) //
result: NUL

hHash := { 0 => "Yesterday", ;
1 => "Today" , ;
2 => "Tomorrow" }

nChoice := 0
? HB_Decode( nChoice, hHash ) // result: yesterday

nChoice := 0
? HB_Decode( nChoice, hHash, "Never" ) // result: error

RETURN

Thanks,
FabioNery




---
Este email foi escaneado pelo Avast antivĂ­rus.
https://www.avast.com/antivirus

Loading...