develooper Front page | perl.perl6.users | Postings from June 2022

Dual Buf and Str question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
June 10, 2022 05:54
Subject:
Dual Buf and Str question
Message ID:
78e8e1be-ac6e-a5c7-971f-37606aacd1d4@zoho.com
Hi All,

I can easily  get away with this in Modula2, but
how can I do this with Raku?

I wish to create a single variable that can be
manipulated in two ways:

1) as a fixed length string (Str)

2) as a fixed length buffer (Buf)

I can think of ways to do this, but it would
require separate variable and conversions routines
back and forth.

Any words of Raku wisdom?

Many thanks,
-T

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About