IonicWind Software

IWBasic => IWGrid => IWGrid Issues => Topic started by: RitchieF on November 18, 2014, 07:48:29 AM

Title: Issue with showing characters
Post by: RitchieF on November 18, 2014, 07:48:29 AM
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
Title: Re: Issue with showing characters
Post by: Brian on November 18, 2014, 11:53:24 AM
Richard,

Have you tried: "\x22" ?

Brian
Title: Re: Issue with showing characters
Post by: LarryMc on November 18, 2014, 12:03:19 PM
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
Title: Re: Issue with showing characters
Post by: LarryMc on November 18, 2014, 12:14:54 PM
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
Title: Re: Issue with showing characters
Post by: Brian on November 18, 2014, 12:31:43 PM
Larry,

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

Brian
Title: Re: Issue with showing characters
Post by: RitchieF on November 18, 2014, 01:03:37 PM
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
Title: Re: Issue with showing characters
Post by: billhsln on November 18, 2014, 01:07:46 PM
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