Menu

#285 Let overloads should support array parameters

open
nobody
None
2024-04-07
2014-05-01
dkl
No

Constructors already support array parameters:

type UDT
    i as integer
    declare constructor( (any) as integer )
end type

constructor UDT( array(any) as integer )
    print "UDT.ctor( (any) as integer )"
end constructor

dim array(any) as integer
dim x as UDT = array()

it'd be nice to have Let overloads support them too:

type UDT
    i as integer
    declare operator let( (any) as integer )
end type

operator UDT.let( array(any) as integer )
    print "UDT.let( (any) as integer )"
end operator

dim array(any) as integer
dim x as UDT
x = array()

Discussion

  • dkl

    dkl - 2014-05-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -19,7 +19,7 @@
            declare operator let( (any) as integer )
        end type
    
    
    -   operator UDT.let( (any) as integer )
    +   operator UDT.let( array(any) as integer )
            print "UDT.let( (any) as integer )"
        end operator
    
     
  • fxm (freebasic.net)

    Already the properties also support arrays:

    type UDT
        i as integer
        declare property prop( (any) as integer )
    end type
    
    property UDT.prop( array(any) as integer )
        print "UDT.prop( (any) as integer )"
    end property
    
    dim array(any) as integer
    dim x as UDT
    x.prop = array()
    
     
  • Jeff Marshall

    Jeff Marshall - 2023-12-22

    Related: [bugs:#991]

     

    Related

    Bugs: #991

  • Jeff Marshall

    Jeff Marshall - 2024-03-30

    Internal changes in fbc 1.20.0 for handling the parsing of non-indexed arrays more like expressions (i.e. array()) make this feature straight forward to add and will commit changes soon.

    Adding this feature will resolve [#991]

    Previous changes that help allow this feature:
    [#984]
    commit [8ee7cd4e50906b90f9091518d2c29c50dd91d19e]

     

    Related

    Bugs: #984
    Bugs: #991
    Commit: [8ee7cd]


Log in to post a comment.

MongoDB Logo MongoDB