zoukankan      html  css  js  c++  java
  • 菜单(Menu)算法

    环境:PowerBuilder9.03 8336

    //////////////////////////////////////////////////////////////////////////////
    //
    // 变量:  Instance Variables   
    //
    // 功能:  实例变量
    //
    //////////////////////////////////////////////////////////////////////////////

    public:
    string is_text

    //////////////////////////////////////////////////////////////////////////////
    //
    // 函数: of_menu
    //
    // 属性: public
    //
    // 参数: menu am_menu
    //
    // 返回: integer
    //
    // 功能: Menu算法
    // 
    //////////////////////////////////////////////////////////////////////////////

    //声明
    integer li_for

    //检测
    if not IsValid(am_menu) then return -1

    for li_for = 1 to upperbound(am_menu.item)
     am_menu.item[li_for].text = is_text + string(li_for,"00")
    next

    for li_for = 1 to upperbound(am_menu.item)
     if upperbound(am_menu.item[li_for].item) > 0 then
      is_text = am_menu.item[li_for].text
      of_menu(am_menu.item[li_for])   //子集  
     end if
    next

    return 1

  • 相关阅读:
    兄弟连学python(1)——MySQL
    运算和运算符相关知识
    关于python中的快捷键
    关于爬虫
    Hello Python
    [ARC101C] Ribbons on Tree
    CF568E Longest Increasing Subsequence
    2021省选游记
    [NEERC2015]Distance on Triangulation
    dp的一些优化
  • 原文地址:https://www.cnblogs.com/PBDragon/p/1821128.html
Copyright © 2011-2022 走看看