Jump to content

Get last array element VIM


Jacemdom

Recommended Posts

There already is a primitive that does this.  The Delete From Array returns the last element in the array if nothing is wired to the length and index.  There was a thread on LAVA years ago about which was a faster method, and a few versions of LabVIEW the method you showed was faster, but in most the delete from array is faster.  And it already has a quick drop dfa.

  • Like 1
Link to comment

I get your point, and there is large amounts of debate over similar topics.  Should I not use Variable=Variable++ since not all developers know this is short hand for incrementing a variable?  To me the delete from array with nothing wired is used for getting the last element, but I get not everyone associates this function with that feature.

But I suppose if you really feel strongly about this you could make a VIM that just has this one primitive in it.

Link to comment
On 12/7/2017 at 8:31 AM, hooovahh said:

There was a thread on LAVA years ago about which was a faster method, and a few versions of LabVIEW the method you showed was faster, but in most the delete from array is faster.  And it already has a quick drop dfa.

Thread in question.

Once the stomping was fixed in the Delete From Array (supposedly in 2014), that became a lot faster than any other method.

Edited by crossrulz
Link to comment

Join the conversation

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

Guest
Reply to this topic...

×   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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.