Issue 19221 - Print Tab(5); "Hello" does not work
Summary: Print Tab(5); "Hello" does not work
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: 4.1.14
Assignee: ab
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-07 23:23 UTC by andrew
Modified: 2023-02-08 18:08 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description andrew 2003-09-07 23:23:34 UTC
Print Tab(5); "Hello"

does not work because Tab does not exist or work. This is documented as working
in the online help. Should this be added to work from BASIC or should this be
removed from the documentation?
Comment 1 ooo 2003-09-08 15:27:01 UTC
Andrew, please do not assign purely StarBASIC runtime issues to me.  I
am only responsible for the OOo API, not for StarBASIC.  Thanks.
Comment 2 ab 2003-09-09 08:25:50 UTC
-> OOo 2.0
Comment 3 b.osi.ooo 2004-05-18 14:52:32 UTC
According to the roadmap of  OpenOffice.org 2.0
(http://tools.openoffice.org/releases/q-concept.html) this
issue has been scheduled for 3.0. 
Comment 4 b.osi.ooo 2004-05-18 14:56:08 UTC
Where in the help did you see the command 'tab' explained?
I looked into <F1> -> Contents -> Macros and Programming -> Command Reference ->
Alphabetic list of funtions... 
I can't find it there.
Comment 5 andrew 2005-02-14 18:53:54 UTC
I missed this question, not certain how....
Open the help pages for OpenOffice.org Basic. Now, click on the Index tab. for
the search term, use "Print statement". It states the following:

Print Statement [Runtime]
Prints the specified strings or numeric expressions in a dialog.
Syntax:
Print Expression1[{;|,} [Spc(Number As Integer);] [Tab(pos As Integer);]
[Expression2[...]] 

Notice the Tab statement that is included. The Spc() function does work,
however... I assume that these exist for VB compatibility...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmPrint.asp

Comment 6 christianjunker 2005-07-23 13:00:41 UTC
started.
reassigned to ab.
cyb->ab: Notice that Tab is not really a function identifier like Spc or Print is.
Question is whether this should be assigned to Online help (i don't know which
component).
Comment 7 christianjunker 2005-07-23 13:01:23 UTC
reassigning..
Comment 8 ab 2006-02-09 13:52:45 UTC
Started
Comment 9 damjan 2015-12-15 04:42:23 UTC
Tab() is a function just like Spc() and Space(), and it was missing.

Patch committed in revision 1720071, resolving fixed.
Comment 10 Laurent BP 2016-10-01 15:46:33 UTC
It seems this patch introduced a regression with TAN function. See tdf#102872:
In basic/source/runtime/stdobj.cxx#523
{ "Tab",          	SbxSTRING,      1 | _FUNCTION, RTLNAME(Tab),0           },
TAB function is expecting a parameter which is taken next line so TAN is unable.
Should insert a line#524 like:
  { "Count",        SbxLONG, 0,nullptr,0 },
Comment 11 Czesław Wolański 2022-07-29 18:38:52 UTC
Confirmed with 4.2.0-dev
Attempting to call the tan function results in a runtime error:
"Sub-procedure or function procedure not defined".
Comment 12 Matthias Seidel 2022-07-29 19:16:16 UTC
(In reply to Laurent BP from comment #10)
> It seems this patch introduced a regression with TAN function. See
> tdf#102872:
> In basic/source/runtime/stdobj.cxx#523
> { "Tab",          	SbxSTRING,      1 | _FUNCTION, RTLNAME(Tab),0           },
> TAB function is expecting a parameter which is taken next line so TAN is
> unable.
> Should insert a line#524 like:
>   { "Count",        SbxLONG, 0,nullptr,0 },

Thanks Laurent!

I will do a test build with your patch added now.

Sorry that we haven't seen that for so long...
Comment 14 Matthias Seidel 2022-08-09 10:20:00 UTC
Cherry-picked for AOO41X now.
Comment 15 Carl Marcum 2022-09-24 22:39:38 UTC
This has a test now.

https://github.com/apache/openoffice/commit/3b297b461537a449cdc46a885832873b48e62701

Patch-By: Czesław Wolański
Comment 16 damjan 2023-02-08 18:08:43 UTC
(In reply to Carl Marcum from comment #15)
> This has a test now.
> 
> https://github.com/apache/openoffice/commit/
> 3b297b461537a449cdc46a885832873b48e62701
> 
> Patch-By: Czesław Wolański

Cherry-picking the test for AOO42X with a1409b3e46fc2fc106591343fd49d8d080d5d5b1, so that later patches apply.