Jump to content
  • 0

unset array


Question

7 answers to this question

Recommended Posts

Posted

@Freefty

refer this Deletearray

in your script it will remove the .array[1] value ..

if you want to know whether the array is deleted or value is removed...you can simple perform a check on the array..

for( set .@i,0; .@i < getarraysize( .array ); set .@i,.@i + 1 )
   dispbottom ".array["+.@i+"] = "+.array[.@i];

Posted

To clean a single value in an array use:

cleararray .@arrary[1],0,1;
OR
set .@array[1],0;

Either one of those will work, additionally, you can use copyarray to simply move values [2]->[127] down 1 thus, replacing [1] with [2], technically this removes [1]'s orignal value, but keeps the array in tact if you needed to add stuff to the end of the file. But the quick solotions i give in the code.

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...