Here is an additional wishlist, bug report, and items
that may need clarification.
- StrComp(string1, string2)
Several compilers have a StrComp function which compares
two strings and returns a 0 if the strings are equal, -1
(or value <0) if string1 < string2, and 1 (or value >0) if
string1 > string2. See 2nd paragraph of tagarray wish
below for explanation of the usefulness of this function.
(There's a slight difference in the way various compilers
implement this. PB may want to combine the best features).
- ARRAY INSERT (at a sorted position)
Let's say I have a sorted list, and I want to insert an element.
I don't want to necessarily insert it at the beginning or end,
or at a pre-determined location. Instead I want to insert the
data at a location in such a way that the array will remain
sorted after the insert. (Resorting the whole array after
each insert would likely be inefficient).
- ARRAY SORT TAGARRAY enhancement
I have a string array, and an integer array. I want a special
sort feature that will sort the tagarray (the integer array)
based on the sorted string array, however, without changing
the order of the string array itself. The string array would
need to remain in its original order. The elements of the
integer array is what would move around. That array would
serve as a sorted index for the string array, allowing you
to later access the string array in powerful ways.
Basically here is what I want to do. I have a string array.
Every time I add an element, I want the string array to maintain
it's sorted index order, so I can later do a fast binary search.
It is also necessary for each string element not to move around,
hence I sort the tagged index array, not the original string
array. I have already implemented what I need without using the
ARRAY functions. But one thing that would allow me to tweak it
further would be the StrComp function. For every one comparison
that StrComp would do, I am currently doing up to two string
comparisons for the binary search. I couldn't find a way around
it.
I see that binary search has been suggested already, so I'm not
adding it as a separate entry in today's wishlist.
- Clarification needed for Select Case
In another discussion, it was said that On/Goto and If/Then are
faster than Select Case, whereas the help file seems to suggest
just the opposite. It says that Select Case is more efficient
than If/Then and On/Goto (the next to last paragraph of the
Select Case help file topic). So I need some clarifications.
Perhaps one is more efficient under some circumstances and less
in other situations?
- Please include an ASCII table in the help file
- Small bug: Copy/paste adds extra space.
If I highlight text up to the end of the line, but the mouse
pointer goes beyond the end of line, and I copy the segment and
paste it elsewhere, it adds extra spaces in the new location,
even though it's not part of what's highlighted. I don't know
if this is by design or not, but it seems a little unusual.
- Bigger bug: The IDE sometimes deletes lines of code.
To duplicate the problem, paste in the following code (at
line 1, column 1):
Then press the PageUp & Home buttons so that you are at the very
top left corner. Now go to line 4 (or beyond), and the press
PageDown. Type in a function, or paste these 4 lines:
Now save it, and load it again. The ByeBye function is gone.
Even before saving it, you'll notice that the text is there, but
you can't move the cursor to that location. Also, if you pasted
those lines instead of typing it, you'll notice that the comment
line wasn't pasted. In my current project, I've had to add
" ' End of Program " at the end of my code, so that I know if
the last few lines are intact or not.
------------------
Daniel Corbier
UCalc Fast Math Parser
http://www.ucalc.com
that may need clarification.
- StrComp(string1, string2)
Several compilers have a StrComp function which compares
two strings and returns a 0 if the strings are equal, -1
(or value <0) if string1 < string2, and 1 (or value >0) if
string1 > string2. See 2nd paragraph of tagarray wish
below for explanation of the usefulness of this function.
(There's a slight difference in the way various compilers
implement this. PB may want to combine the best features).
- ARRAY INSERT (at a sorted position)
Let's say I have a sorted list, and I want to insert an element.
I don't want to necessarily insert it at the beginning or end,
or at a pre-determined location. Instead I want to insert the
data at a location in such a way that the array will remain
sorted after the insert. (Resorting the whole array after
each insert would likely be inefficient).
- ARRAY SORT TAGARRAY enhancement
I have a string array, and an integer array. I want a special
sort feature that will sort the tagarray (the integer array)
based on the sorted string array, however, without changing
the order of the string array itself. The string array would
need to remain in its original order. The elements of the
integer array is what would move around. That array would
serve as a sorted index for the string array, allowing you
to later access the string array in powerful ways.
Basically here is what I want to do. I have a string array.
Every time I add an element, I want the string array to maintain
it's sorted index order, so I can later do a fast binary search.
It is also necessary for each string element not to move around,
hence I sort the tagged index array, not the original string
array. I have already implemented what I need without using the
ARRAY functions. But one thing that would allow me to tweak it
further would be the StrComp function. For every one comparison
that StrComp would do, I am currently doing up to two string
comparisons for the binary search. I couldn't find a way around
it.
I see that binary search has been suggested already, so I'm not
adding it as a separate entry in today's wishlist.
- Clarification needed for Select Case
In another discussion, it was said that On/Goto and If/Then are
faster than Select Case, whereas the help file seems to suggest
just the opposite. It says that Select Case is more efficient
than If/Then and On/Goto (the next to last paragraph of the
Select Case help file topic). So I need some clarifications.
Perhaps one is more efficient under some circumstances and less
in other situations?
- Please include an ASCII table in the help file
- Small bug: Copy/paste adds extra space.
If I highlight text up to the end of the line, but the mouse
pointer goes beyond the end of line, and I copy the segment and
paste it elsewhere, it adds extra spaces in the new location,
even though it's not part of what's highlighted. I don't know
if this is by design or not, but it seems a little unusual.
- Bigger bug: The IDE sometimes deletes lines of code.
To duplicate the problem, paste in the following code (at
line 1, column 1):
Code:
Function PbMain ' The following lines are ' there mostly to fill up ' space to demonstrate the ' IDE problem. ' ' Enter enough lines of code ' (or paste this function) ' so that the last line of ' text (the one that says ' "End Function") ends up on ' line 26 or beyond. ' ' Maximize the IDE screen. ' The last line should be just ' below the bottom, in such a ' way that there's a scroll ' bar at the right, and ' Function PBMain is not visible ' at the same time as End Function ' ' For x = 1 to 10 ' y = x ' Next ' Etc... End Function
top left corner. Now go to line 4 (or beyond), and the press
PageDown. Type in a function, or paste these 4 lines:
Code:
' The following function disappears Function ByeBye As Long MsgBox "Gone!" End Function
Even before saving it, you'll notice that the text is there, but
you can't move the cursor to that location. Also, if you pasted
those lines instead of typing it, you'll notice that the comment
line wasn't pasted. In my current project, I've had to add
" ' End of Program " at the end of my code, so that I know if
the last few lines are intact or not.
------------------
Daniel Corbier
UCalc Fast Math Parser
http://www.ucalc.com
Comment