Results 1 to 3 of 3

Thread: Proposed Wide String (Unicode) support in OxygenBasic

  1. #1

    Proposed Wide String (Unicode) support in OxygenBasic

    Proposal:

    Attempting to keep it as transparent as possible so that Ascii strings and Wide Strings can be correctly combined or manipulated together.

    New Types

    wstring Wide dynamic string

    Bstring2 Wide Bstring

    Zstring2 Wide null-terminated string (terminated by 2 null bytes)


    New String Functions:


    Wchr(n) wide counterpert of chr(n)

    Unic(s) Unic(s,n) wide counterpart of Asc(s) or Asc(n,i)

    Wide string literals

    w"this string has wide characters"
    w`and so does this`

    By using internal overloaded functions, I hope everything else can be handled automatically

    Charles

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736
    Hi Charles,

    this proposal sounds great to me, especially the overloading part. I am looking forward to it

    Will the w prefix for quotes be necessary even for case you assign to WString variable? I think in such a case it could be presumed as default you assign Unicode string.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    Yes Petr,

    Character width is automatically adjusted to the Type being used - whether wstring or string etc.

    Wide Literals may still be necessary in some circumstances - low level coding for example, where there is no specified variable type.

    Charles

Similar Threads

  1. Cosmic Wide Web
    By zak in forum Shout Box Area
    Replies: 5
    Last Post: 06-05-2011, 21:23
  2. message wide versus user info wide
    By zak in forum Shout Box Area
    Replies: 7
    Last Post: 07-11-2010, 16:39
  3. Is this ASCII, ANSI, UNICODE or something else?
    By martin in forum thinAir General
    Replies: 12
    Last Post: 29-04-2009, 09:56

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •