Multiline string value
Is there any comfortable way to define multiline string value in OScript?
I need something like this:
sqlQuery = """SELECT
objf.sys_name,
objf.ui_name,
objf.show_order,
ftype.system_name as type
FROM
object_field objf,
field_type ftype
WHERE
objf.object_type_id = 1
AND objf.field_type_id = ftype.id
"""
Comments
-
Victor,
try using ` instead of ' when defining the string. ex:
public String fWhatever = `select *
from Kuaf
where name = :A1`
Cheers...
1 -
Thanks John. Unfortunately the module is not being built with this syntax.
I have a build error in the module tree but no comments from the compiler.
If you tell where to find build logs I can try to find details.
0 -
UPDATE: I found the compiler error message: incorrect syntax, unexpected LONGSTRING
0 -
Hiya - it sounds like something is fundamentally odd syntactically in your OS file. The error implies that you did indeed enter the long string with ` characters (so that's good), but where this long string is doesn't look right I would guess.
If you'd like to email me your source: I'm dcarpene@opentext.com . I'll see if I can figure this out, assuming that's an option.
@siegel: vi is an editor with two modes: one which destroys your input and the other which beeps at you
0 -
For reference to those that may be following along: the issue was that the longstring was defined inside the function, which isn't allowed. It needs to be defined outside the function & then referenced from within the function. For example:
Bad:
function x() String y = `longstring` .doSomething(y) end
Good:
String y = `longstring` function x() .doSomething(.y) end
@siegel: vi is an editor with two modes: one which destroys your input and the other which beeps at you
2 -
Thanks Dave! It works fine.
But it looks a bit weird for me - why doesn't syntax allow to declare a LONGSTRING in a function.
So I need to declare many LONGSTRING variables in my script since I have many functions there :)
0 -
That one I cannot answer myself - I'll check to see what info may exist.
@siegel: vi is an editor with two modes: one which destroys your input and the other which beeps at you
0 -
Thanks Dave but don't worry too much. That was just my thoughts aloud :)
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 102 General Questions
- 123 Services
- 40 OpenText Hackathon
- 33 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 901 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 127 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax