March 28, 2024, 07:36:23 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Issue with showing characters

Started by RitchieF, November 18, 2014, 07:48:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RitchieF

This is an extract of my code :

DEF CelticChar :string

rr = 3
for cc = 1 to 23 'Line3
GETDATA CelticText3,CelticChar
IWG_InitCellDat( main, 501, rr, cc, CelticChar, @IWGANY, @IWG_CENTERALIGN)
next cc

DATABEGIN CelticText3
DATA "A","S","D","F","G","H","J","K","L",":",";","\""," ","a","s","d","f","g","h","j","k","l","'"
DATAEND


Writing the backslash with quote to have a single quote the rest of the datas are not shown.
Replacing the \" with a different letter works fine and fills the complete row.
Is this a grid issue or an issue with my code ?

Thanks,
Richard

Brian

Richard,

Have you tried: "\x22" ?

Brian

LarryMc

QuoteIs this a grid issue or an issue with my code ?

Neither; it appears to be a problem with IWB's data statements.

Give me a bit to come up with a work around.
Quote
"\x22"
gives the same error
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

modify your code to work like this
DEF CelticChar :int

rr = 3
for cc = 1 to 23 'Line3
GETDATA CelticText3,CelticChar
'IWG_InitCellDat( main, 501, rr, cc, chr$(CelticChar), @IWGANY, @IWG_CENTERALIGN)
?chr$(CelticChar)
next cc


DATABEGIN CelticText3
'DATA "A","S","D","F","G","H","J","K","L",":",";","\""," ","a","s","d","f","g","h","j","k","l","'"
DATA  65, 83, 68, 70, 71, 72, 74, 75, 76, 58, 59, 34,  32, 97, 115,100,102,103,104,106,107,108,96
DATAEND
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Larry,

Can you please explain what the "?" operator is doing? And where is that in the help file!

Brian

RitchieF

Brian,

Print is abbreviated to a question mark in several basic dialects as much as I know since C64 times.

Larry

Quotemodify your code to work like this

this would have been my next idea. Just wanted to clear what's wrong in this case.

Thanks anyway Brian, Larry

billhsln

I tested doing it thru a ISTRING and the following works:

DEF i:INT
DEF celtic[23] = "ASDFGHJKL:;\" asdfghjkl'":ISTRING

FOR i = 0 TO 21
PRINT i," ", celtic[i]
NEXT i


Just another way of doing it.

Bill
When all else fails, get a bigger hammer.