Patrick, As Ron said, this is intentional. This is a xHB extension like:
a := "ABCD" ? a[2] // prints "B", no RT error These are similar extensions because in C, 1 byte char can be read as numeric, as well as a multiple by char can be adressed as array of char. It means you can use C-like techniques in PRG to speed up your app. Best Regards, Marcelo Lombardo www.xharbour.com.br On Apr 2, 2009, at 8:39 AM, Patrick Mast, xHarbour. wrote: > Hello, > >> I would like error/base instead these results: >> >> ? str('1') // null char >> ? str('1',0) // 49 >> ? str('1',1) // * >> ? str('1',2) // 49 > > I agree. Str("a",1,0) should produce an error. > > Patrick > > ------------------------------------------------------------------------------ > _______________________________________________ > xHarbour-developers mailing list > xHarbour-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xharbour-developers > ------------------------------------------------------------------------------ _______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers