Issue 44469 - basic: Instr Function behaves
Summary: basic: Instr Function behaves
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: OOo 2.0 Beta
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ab
QA Contact: issues@udk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-08 13:18 UTC by Oliver Brinzing
Modified: 2005-04-05 15:17 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2005-03-08 13:18:57 UTC
Hi,

the basic InStr() Function seems to be different from SO 5.2 ...

Is it a bug or new feature ?

regards

Oliver
--

OPTION EXPLICIT

Sub testInstr()
	
	Dim sSearch as String
	Dim sString as String

	sString = "Sheet_X"
		
	' Result 1
	sSearch = "Sheet_X"	
	MsgBox InStr(1, sString, sSearch, 0)

	' Result 0
	sSearch = "Hello"
	MsgBox InStr(1, sString, sSearch, 0)

	' Result 6
	sSearch = "_X"
	MsgBox InStr(1, sString, sSearch, 0)

	' Result 1 in OO 1.1.4 / OO 2.0 ???
	' In SO 5.2 it was 0 ...
	sSearch = ""	
	MsgBox InStr(1, sString, sSearch, 0)

End Sub
Comment 1 kay.ramme 2005-03-14 09:05:07 UTC
Andreas, was the change intended?
Comment 2 ab 2005-03-22 13:26:32 UTC
The change was intended. Instr behaves VB compatible now.
Comment 3 ab 2005-04-05 15:17:00 UTC
Closed