Author Topic: How to delete all elements in a hash table in Slick-C?  (Read 576 times)

rowbearto

  • Senior Community Member
  • Posts: 1395
  • Hero Points: 108
How to delete all elements in a hash table in Slick-C?
« on: April 28, 2018, 03:58:06 pm »
I want to remove all elements of a hash table in a Slick-C macro.

I see there is a function _deleteel() to delete an individual element of the hash table, but how to delete all the elements?

rowbearto

  • Senior Community Member
  • Posts: 1395
  • Hero Points: 108
Re: How to delete all elements in a hash table in Slick-C?
« Reply #1 on: April 28, 2018, 04:01:26 pm »
Found it - _makeempty()

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2738
  • Hero Points: 419
Re: How to delete all elements in a hash table in Slick-C?
« Reply #2 on: May 01, 2018, 02:01:36 pm »
You can also just assign null.

Code: [Select]
    bool been_there_done_that:[];
    been_there_done_that:["Shenandoah National Park"] = true;
    been_there_done_that:["Everglades National Park"] = false;
    been_there_done_that = null;