纷享销客开发者手册 纷享销客开发者手册
  • APL开发手册
  • PWC开发手册
  • OpenAPI 文档
APL代码介绍
API Reference
开发工具
更新日志
  • 简体中文
  • English
APL代码介绍
API Reference
开发工具
更新日志
  • 简体中文
  • English
  • 入门

  • 数据类型

    • 数据类型介绍
    • Math类型
    • CollectionUtils类型
    • Range类型
    • HttpResult类型
    • QueryResult类型
    • Duration类型
    • Map类型
    • List类型
    • DateTime类型
    • Time类型
    • Date类型
    • Boolean类型
    • BigDecimal类型
    • String类型
    • Integer类型
  • API

Range类型

# Range类型

在自定义函数中不支持for循环,但是可以用Range完成循环语句逻辑

定义:

Range range = Ranges.of(Integer start,Integer end)

range.each{

}

注:最多循环500次

举例:

Range range = Ranges.of(1,5)

range.each{ it ->
  log.info(it)
}  
//[1,2,3,4,5]
CollectionUtils类型
HttpResult类型

← CollectionUtils类型 HttpResult类型→

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式