Announcement

Collapse
No announcement yet.

Update 6.0.6.298893

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

  • Update 6.0.6.298893

    I Just implemented ARRAY ASSIGN. For now, the target Array must be 1 dimension, but this limitation could be lifted later.

    I also added the LIST() feature, based in the PHP list() feature, but with some differences. It cannot omit parameters and the source must always be a 1 dimension array. Target variables must be of the same data type (or compatible enough) as the source array.

    I Also fixed the DIM statement for numeric arrays. Apparently it was broken and i didnt know it. Sorry.

    These features are compatible with PowerBASIC, Oxygen, PHP, Javascript and Java (for Android too).

    Code:
    [FONT=Courier New][B][COLOR=Blue]#COMPILE[/COLOR] [COLOR=Black]exe[/COLOR]
    [COLOR=Blue]#COMPILER[/COLOR] [COLOR=Blue]PBWIN[/COLOR]
    [COLOR=Blue]#OPTIONS[/COLOR] [COLOR=Black]X32[/COLOR]
    [COLOR=Blue]#DIM[/COLOR] [COLOR=Blue]ALL[/COLOR]
    [COLOR=Blue]#OPTIONS[/COLOR] [COLOR=Black]developer[/COLOR]
    
    [COLOR=Blue]FUNCTION[/COLOR] [COLOR=Black]PBMAIN[/COLOR][COLOR=Black]([/COLOR][COLOR=Black])[/COLOR] [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    
    [COLOR=Blue]     DIM[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]10[/COLOR][COLOR=Black])[/COLOR] [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    [COLOR=Blue]     LOCAL[/COLOR] [COLOR=Black]Index[/COLOR] [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    [COLOR=Blue]     LOCAL[/COLOR] [COLOR=Black]v1[/COLOR]    [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    [COLOR=Blue]     LOCAL[/COLOR] [COLOR=Black]v2[/COLOR]    [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    [COLOR=Blue]     LOCAL[/COLOR] [COLOR=Black]v3[/COLOR]    [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    [COLOR=Blue]     LOCAL[/COLOR] [COLOR=Black]v4[/COLOR]    [COLOR=Blue]AS[/COLOR] [COLOR=Blue]LONG[/COLOR]
    
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=DarkGreen]"========================"[/COLOR]
    [COLOR=Blue]     FOR[/COLOR] [COLOR=Black]Index[/COLOR] [COLOR=Black]=[/COLOR] [COLOR=Black]0[/COLOR] [COLOR=Blue]TO[/COLOR] [COLOR=Black]3[/COLOR]
    [COLOR=Black]          Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]Index[/COLOR][COLOR=Black])[/COLOR] [COLOR=Black]=[/COLOR] [COLOR=Blue]RND[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]1[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]10000[/COLOR][COLOR=Black])[/COLOR]
    [COLOR=Blue]          STDOUT[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]Index[/COLOR][COLOR=Black])[/COLOR]
    [COLOR=Blue]     NEXT[/COLOR] [COLOR=Black]Index[/COLOR]
    
    [COLOR=Blue]     LIST[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]v1[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]v2[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]v3[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]v4[/COLOR][COLOR=Black])[/COLOR] [COLOR=Black]=[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black])[/COLOR]
    
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=DarkGreen]"========================"[/COLOR]
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]v1[/COLOR]
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]v2[/COLOR]
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]v3[/COLOR]
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]v4[/COLOR]
    
    [COLOR=Blue]     ARRAY[/COLOR] [COLOR=Blue]ASSIGN[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black])[/COLOR] [COLOR=Black]=[/COLOR] [COLOR=Black]20[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]40[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]60[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]80[/COLOR]
    
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=DarkGreen]"========================"[/COLOR]
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]0[/COLOR][COLOR=Black])[/COLOR]      
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]1[/COLOR][COLOR=Black])[/COLOR]      
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]2[/COLOR][COLOR=Black])[/COLOR]      
    [COLOR=Blue]     STDOUT[/COLOR] [COLOR=Black]Arrs[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]3[/COLOR][COLOR=Black])[/COLOR]      
    
    [COLOR=Blue]END[/COLOR] [COLOR=Blue]FUNCTION[/COLOR][/B][/FONT]
    www.pluribasic.com
    www.patreon.com/pluribasic
Working...
X