You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Shirish Tatikonda (JIRA)" <ji...@apache.org> on 2016/02/23 08:48:18 UTC

[jira] [Commented] (SYSTEMML-533) Error when print consecutive pound signs

    [ https://issues.apache.org/jira/browse/SYSTEMML-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15158489#comment-15158489 ] 

Shirish Tatikonda commented on SYSTEMML-533:
--------------------------------------------

:) This is because ## is used internally as a placeholder for variable names in the generated runtime instructions. 

We should remove the usage of ##, and instead, use some non-printable characters to identify variable names in the instructions. We already have some non-printable characters for operand delimiter etc.

> Error when print consecutive pound signs
> ----------------------------------------
>
>                 Key: SYSTEMML-533
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-533
>             Project: SystemML
>          Issue Type: Bug
>          Components: Parser
>            Reporter: Deron Eriksson
>            Priority: Minor
>
> Trying to print consecutive pound (#) signs results in an error:
> {code}
> print("#"); # this works
> print("##"); # this doesn't work
> print("###"); # this doesn't work
> print("#"+"#"); # this doesn't work
> a="##";
> print(a); # this doesn't work
> b="#";
> print(b+b); # this doesn't work
> {code}
> Error:
> {code}
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -12
> 	at java.lang.String.substring(String.java:1937)
> 	at org.apache.sysml.lops.runtime.RunMRJobs.updateInstLabels(RunMRJobs.java:449)
> 	at org.apache.sysml.lops.runtime.RunMRJobs.updateLabels(RunMRJobs.java:478)
> 	at org.apache.sysml.runtime.instructions.cp.CPInstruction.preprocessInstruction(CPInstruction.java:81)
> 	at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:306)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)