Announcement

Collapse
No announcement yet.

SPACE$ with PUT (bug?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SPACE$ with PUT (bug?)

    Is there any reason why the following statement would generate a compiler error?

    PUT #1,1,SPACE$(487)

    It always gives me "Variable Expected"

    Is this a bug?

    ------------------
    Thanks,

    John Kovacich
    Ivory Tower Software

  • #2
    Shouldn't you use:
    PUT$ #1, SPACE$(487)
    for string data?


    ------------------
    --Dan
    Dan

    Comment


    • #3
      John,

      The PUT Command requires a variable when is already defined.
      The PUT$ Command can build a string within the command.
      Code:
      EXAMPLE PUT
        a$=Space$(100)
        index&=101
        PUT #1,index&,a$  ' a variable name is required
      
      
      EXAMPLE PUT$
        index&=101
        Seek #1,index&
        PUT$ #1,space$(100)  ' can create a string
      Phil




      ------------------
      E-Mail:
      pt AT pursuersoft DOT com

      Comment

      Working...
      X