Summary: | On GoSub statement does not work properly | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Jean-Pierre Sanchez <jeanpierresanchez0000> |
Component: | BASIC | Assignee: | Andreas Heinisch <andreas.heinisch> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | andreas.heinisch, jeanpierresanchez0000, raal, rafael.palma.lima |
Priority: | medium | ||
Version: | 4.1.0.4 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 107659 | ||
Attachments: | Result from the macro |
Description
Jean-Pierre Sanchez
2024-03-22 20:45:11 UTC
I copied the code, pasted it on the Basic IDE and ran it... I got 1 as result. Can you test this again? System info Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 12; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+wayland) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 4:24.2.1~rc2-0ubuntu0.23.10.1~lo1 Calc: threaded Created attachment 193251 [details]
Result from the macro
Thanks Rafael for your quick response. I made a mistake when I copied the code. Change 'On 1 GoSub SubA, SubB' By 'On 0 GoSub SubA, SubB' You'll get 2 as result Cheers Hello Could you tell me if you get the same result when you run the following code? Cheers Sub Main Dim i As Integer GoSub Sub1 Print i Exit Sub Sub1: On 0 GoSub SubA, SubB i=i+1 Return SubA: Return SubB: Return End Sub I can confirm with Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a) and Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2887ffbf240aa70330cb50bf810170cf9c896405 CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded Jumbo Help: https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03090303.html?DbPAR=BASIC#bm_id3153897 "If expression is 0, the statement is not executed." @Andreas, this one might interest you. Thank you Rafael for the ping. It is on my list. Lot of work currently so less libreoffice :( |