Compare strings

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

Compare strings

Post by wayne millard »

Hi Team,

Is there a problem with compare string? i always get the value 0 if they are the same or different.
And strings dont show in the Variables window in the ICD HP299.

Thanks
Wayne :D

wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

Re: Compare strings

Post by wayne millard »

Hi,

It works ok in flowcode V4 but not V5

Wayne

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Compare strings

Post by JonnyW »

Hi Wayne.

Yes, strings not being shown in ICD mode has been reported, we are looking into it here. The problem seems to be arrays in general.

As far as string compare can you post a sample? I can't see anything in a simple program that would cause this to fail and simple tests work OK. Do you mean simulation or on chip?

Cheers,

Jonny

wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

Re: Compare strings

Post by wayne millard »

Hi Jonny,

Thanks for coming back to me.

Here are two examples one v4 and one v5. version 4 works in simulation have not tried in hardware v5 Result always = 0

Thanks
Wayne
Attachments
Compare v5 working.fcf
not working
(6 KiB) Downloaded 307 times
Compare v4 working.fcf
working
(4.5 KiB) Downloaded 295 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: Compare strings

Post by JohnCrow »

String Compare Function
Hi Ive just done some test of my own (NOT using ICD)
Looks like PIC FC5 could have a problem.

PIC 16F877A on HP488 Dev Board
AVR ATMEGA 324

FC4 PIC

String1 = Hello
String2 = Hello

Shows these are the same

Set to case sensitive
String1 = Hello
String2 = HELLO

Shows not the same

String1 = Hello
String2 = World

Shows not the same regardless of case

Works on both hardware and simulation.


FC5 PIC

String1 = Hello
String2 = Hello

Show same in simulation
Show different on hardware

String1 = Hello
String2 = World
Show same in simulation
Show different on hardware

Case sensitive
String1 = Hello
String2 = HELLO
Show same s in simulation
Show different on hardware

FC5 AVR

String1 = Hello
String2 = Hello

Shows these are the same

Set to case sensitive
String1 = Hello
String2 = HELLO

Shows not the same

String1 = Hello
String2 = World

Shows not the same regardless of case

Works on both hardware and simulation.

FC5 ARM

Only tried in simulation on ARM (No Hardware)
Seems to work properly

FC4 dsPIC

Works fine on both hardware and simulation
String Test - FC4 PIC.fcf
(6.5 KiB) Downloaded 280 times
String Test-FC5 PIC.fcf
(9.5 KiB) Downloaded 288 times
String Test-AVR.fcf_avr
(9.5 KiB) Downloaded 256 times
1 in 10 people understand binary, the other one doesn't !

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Compare strings

Post by DavidA »

Hmm thanks John,

Ill poke Jonny tomorrow with this

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Compare strings

Post by JonnyW »

Hi. Yes, the bug is simulation only and is only in the PIC v5.2. We will hopefully be bringing the PIC v5.3 in line with the ARM/AVR versions and this will fix the issue.

In fact, I think the bug leaves the compare result unchanged regardless of the compare.

Apologies for this, and we will roll out the PIC 5.3 asap.

Jonny

wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

Re: Compare strings

Post by wayne millard »

Hi Jonny,

Will the strings problem be fixed for the HP299 debugger as well in 5.3 iss ?

Thanks
Wayne :P

Post Reply