weixin_39747383 2020-11-19 12:15
浏览 0

Comments are not handled correctly in FOR loops

Originally submitted to Google Code by froschre... on 13 Dec 2012

When copying in ride a whole text block to another keyword, comments are not pasted but thrown away when being copied via the user interface.

Source file part to be copied: ${IU Port-VLANs} = Create List ## will hold test vlans later : FOR ${iuport} IN @⁠{IUPortsList} \ ${slot number} = Get From Dictionary ${iuport} ${const.strLogicalSlot} # retrieve current bridgeport's slot number \ ${port number} = Get From Dictionary ${iuport} ${const.strPort} # retrive current bridgeport's port number \ ${slot number} = Convert To Integer ${slot number} # convert slot number from 'str' to 'int' (for calculation) \ ${port number} = Convert To Integer ${port number} # convert port number from 'str' to 'int' (for calculation) \ ${vlan to add} = Evaluate ${slot number 128} + ${port number - 1} # calculate port VLAN ID (formula: 128slot + port -1) \ Append To List ${IU Port-VLANs} ${vlan to add} # add calculated vlan to the list Log List ${IU Port-VLANs}

after paste: ${IU Port-VLANs} = Create List ## will hold test vlans later :FOR ${iuport} IN @⁠{IUPortsList} \ ${slot number} = Get From Dictionary ${iuport} ${const.strLogicalSlot} \ ${port number} = Get From Dictionary ${iuport} ${const.strPort} \ ${slot number} = Convert To Integer ${slot number} \ ${port number} = Convert To Integer ${port number} \ ${vlan to add} = Evaluate ${slot number *128} + ${port number - 1} \ Append To List ${IU Port-VLANs} ${vlan to add}

  • 写回答

17条回答 默认 最新

  • weixin_39747383 2020-11-19 12:15
    关注

    Originally submitted to Google Code by froschre... on 13 Dec 2012

    It seems this is caused by comments starting with '# '. When using '## ', they are copied correctly.

    评论

报告相同问题?