You are here: Foswiki>Tasks Web>Item1350 (04 Jan 2015, GeorgeClark)Edit Attach

Item1350: SpreadSheetPlugin's should accept strings in quotes and not see the quote as part of the string

pencil
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: SpreadSheetPlugin
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: GeorgeClark
---+++++ 1 %CALC{"$FIND(*, '* something')"}%
---+++++ 2 %CALC{"$FIND(*, ' * something')"}%
---+++++ 3 %CALC{"$FIND(*, '  * something')"}%
---+++++ 4 %CALC{"$FIND(*, '   * something')"}%
---+++++ 5 %CALC{"$FIND(*, '    * something')"}%
---+++++ 6 %CALC{"$FIND(*, '     * something')"}%
---+++++ 7 %CALC{"$FIND(*, '      * something')"}%
---+++++ 8 %CALC{"$FIND(*, '       * something')"}%
---+++++ 9 %CALC{"$FIND(*, '        * something')"}%
gets us
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
I assumed that it might be that * is special - so replacing the * with a B
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10

Being me, I thought the ' might be able to be used to delineate the string, but then the return is one larger than the docco implies..

on the other hand, given that the docco implies that the quote is irrelevant, it seems to be the return is one smaller than the docco imples.

not at all sure what should happen :/

so, i remove the space before the ', and the '
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1

resulting in yet another oddity.

now, from this i'm sure the reader will have an idea what the brilliant developer did to cause this disgusting mess, and how I'm going to work around it, but, um, (to quote Meri) bleugh bleh.

-- SvenDowideit - 22 Mar 2009

I will look at this when I get to the FIND function in my auto test case work.

-- KennethLavrsen - 30 Mar 2009

There is nowhere in SSP that the documentation that you can enclose strings inside quotes.

And given that the ' is just another character and that leading and trailing spaces are ignored in all SSP functions there is actually no bug.

But it is annoying that quotes are not accepted because it limits the use when you have strings where especially leading space is important.

So the wish must be for an enhancement to accept quotes around strings. This however can give other problems so we must be careful with that.

-- KennethLavrsen - 22 Apr 2009

1.2 is adding a TWiki feature, supporting triple-quoted strings '''String with commas, parenthesis, newlines''' Unfortunately it doesn't handle leading spaces. I think anything more comprehensive with quoted strings needs a feature proposal. Adding white-space sensitivity to %CALC will be

-- GeorgeClark - 04 Jan 2015

ItemTemplate edit

Summary SpreadSheetPlugin's should accept strings in quotes and not see the quote as part of the string
ReportedBy SvenDowideit
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component SpreadSheetPlugin
Priority Enhancement
CurrentState Proposal Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r7 - 04 Jan 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy