B4A Question 2D arrays - ShepSoft (first post)    Jul 09, 2020   (1 reaction) To do the reverse and return a multi-dimensional array from a Sub we can do this:
Sub dbgOut As String(,)
Public strArr(2,2) As String
strArr(1,1) = "Out world!"
Return strArr
End Sub
This example creates a 2D array within the Sub and returns it from the sub. Note that you must explicitl B4A Question (SOLVED) - Is it possible to return more than 1 value in Resumable Subs? - Erel (first post)    Nov 14, 2019   (6 reactions) Another option is to return an array: Sub DoSomething As ResumableSub Return Array(1, 2, "c") End Sub Wait For (DoSomething) Complete (Result() As Object) Log(Result(2)) Bug? For Each Loop - Erel (first post)    Mar 14, 2021   (3 reactions) Returning an array of strings from a sub is not supported. The compiler should have thrown an error. It will be fixed.
Only primitives (numbers), strings and arrays of primitives can be returned from a sub. B4A Question move camera position x y change - William Lancee (first post)    Jul 13, 2023   (2 reactions) -1) Else Return Array As Int(Ceil(Sumx / N), Ceil(Sumy / N)) '-1 is unknown End Sub B4A Question Declare Array of int? - klaus (first post)    Apr 19, 2018   (2 reactions) Sub MySub(TwoDimensions(,) As Int ThreeDimentions(,,) As Int) As Int (,) The return Array is two dimensional. B4A Question convert file image to Byte Array - JordiCP (first post)    Oct 22, 2015   (6 reactions) The Sub should be declared to return an array, not a single byte.;) Sub GetImageBytes() As Byte() '<---- Here Dim bytes() As Byte = Bit.InputStreamToBytes(File.OpenInput(File.DirRootExternal,"MyApp/profile.jpg")) '<--- Also, there was a missing closing ')' Return bytes End Sub B4A Question Calculating Solar Azimuth [Solved] - DonManfred (first post)    Dec 01, 2016   (1 reaction) The sub returns an array AzimuthAstro = Astro2.SunPosition(...) should be Private AzimuthAstro() As Double i guess B4A Question Why i getting this Error - Alhootti (first post)    Mar 23, 2024 Y = 30 * N + J - 30 Return Array (Y,M,D) End Sub Sub Fix(arg As Int) As Int Return Ceil(arg ) End Sub B4A Question Array as Return type - iKingBob    Aug 20, 2023 I'm coding something like building a class of arrays and and a getArray sub with one parameter
How do i set return type of this sub as array..?
I've tried
And it didn't work as it shows 'missing library reference error'
Any help appreciated, thanks ❤️ B4A Question How do i scan for multiple BLE UUIDs? - ema01 (first post)    May 23, 2024   (2 reactions) Else If p.SdkVersion < 34 Then 'B4A doesn't have the strings implemented Return Array As String (Starter.rp., "android.permission.BLUETOOTH_SCAN", "android.permission.BLUETOOTH_CONNECT") Else 'B4A doesn't have the strings implemented Return Array As String (Starte Page: 1   2   3   4   5   6   7   Powered by ColBERT |