ISML Function - hasNext()

Name

hasNext()

Short Description

checks whether the iterator instance currently used in a loop contains any elements

Table of Contents

Product Version

6.5

Product To Version

 

Statusfinal

1 Introduction

The ISML function hasNext() allows you to check whether the iterator instance currently used in a loop contains any elements. This is useful, for example, in case the last loop element requires special treatment.

2 Syntax

hasNext( <loop iterator identifier> )

3 Example

<ISLOOP iterator="foo">
  ...
  <ISIF condition="#hasNext(foo)#">
    ... (do something except for last line)
  </ISIF>
  ...
</ISLOOP>

Note

If an alias name has been defined for the iterator, this alias has to be used for hasNext() as well.

Reference - ISML Functions

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets