Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to remove latest element from dynamic array

204 views
Skip to first unread message

Šula Miloš

unread,
Sep 10, 2008, 5:40:05 AM9/10/08
to
Hi all,
i want to remove latest element from dynamic array, for example

string a[]

a[1]='a'
a[2]='b'

and now i want remove a[2] from this array.

Milos


Terry Voth

unread,
Sep 10, 2008, 7:32:00 AM9/10/08
to
The easy answer is to set the second element to null or empty string,
but if you want the new UpperBound() to be 1, then you'll have to copy
the remaining elements to a new array.

Overall, it might be easier if you were using an external DataStore
instead of an array.

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

*********************************
Build your vocabulary while feeding the hungry
http://www.freerice.com
*********************************
Newsgroup User Manual
=====================
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 4.0.4 now available at the Sandbox
PB Futures updated June 25/2008
See the PB Troubleshooting & Migration Guides at the Sandbox
^ ^
o o
=*=

0 new messages