Basic in Java :-)

Hello everyone. I got a little problem. i try to develop a library for my old pen plotters..... How can i convert the following Basic Line in Java CHR$(27);“%0B”; i think its a small problem by i don´t get the answer. Thanks a lot Stephan

Answers

  • edited November 2013

    CHRS$(27) is just how you'd reference the esc character. so that's assigning <ESC>%0B somewhere. java equivalent would just be a byte set to 27, i guess

    http://www.piclist.com/techref/language/pcls.htm

    says that that identifies a PCL command.

    (edit, vanilla ate bits of my post)

  • edited November 2013

    I believe BASIC CHR$(27) is '\u001B' in Java. And "%0B" is '\u000B'.
    So you can create this sequence this way I guess: :-??

    final String VT = "\u001B\u000B";
    
  • i'm pretty sure that's a literal "%0B" rather than %0B, ie 3 characters rather than 1

  • Oops! So that'd be now: :@)

    final String PCL = "\u001B%0B";
    
Sign In or Register to comment.