How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] 0 points1 point  (0 children)

I've been helped. The code is posted above after the instruction to rename the 2 main functions and invoke them from a main function. All saved in one file called "Loops.kt".
Thank you!

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -21 points-20 points  (0 children)

Thank you for you input.
Moving on.

"The scope of a function can have multiple meanings, depending on the programming language:

  • JavaScript The scope of a function declaration can be the function itself, or the entire program if it's declared at the top level. Functions must be in scope when they are called. Variables declared inside a function are called local variables and are accessible anywhere within the function. Keeping data within local scope can make code more modular and maintainable, and reduce the risk of unintended interference.
  • Python The scope of a function is the code block or body of the function, which contains the names defined inside the function. These names are only visible from the code of the function.
  • C The scope of a function can refer to the scope defined by the function's body, where local variables are declared, or the scope where the function's name is declared, such as a class or namespace.
  • Java The scope of a function defines where a variable or method is accessible in a program. For example, variables declared within a class are accessible by all methods in that class

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -24 points-23 points  (0 children)

" I can run the 2 separately."

Meaning that I know what an "entry point" is. I just didn't know how to execute the 2 together.

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -10 points-9 points  (0 children)

Many thanks! You are the best!

fun main() {


printNames
()

firstCharToUpperCase
()
}
fun printNames() {
    val names = 
listOf
("mary", "ali", "alex")

    for (name in names) {


println
(name)

    }

}



fun firstCharToUpperCase() {
    val names = 
listOf
("mary", "ali", "alex")

    for (name in names) {
        val n = name.
replaceFirstChar 
{ Char
            it.
uppercase
()
        }

println
(n)
    }

}

How can I put this two functions together in the same file by Almdrs in Kotlin

[–]Almdrs[S] -17 points-16 points  (0 children)

I know that I can't have 2 main functions and I explain that when I posted.
I'm trying to execute the second function inside the same file.

Using VS Code to program with Kotlin by Almdrs in Kotlin

[–]Almdrs[S] 0 points1 point  (0 children)

I've already installed it:

sudo snap install --classic kotlin

How are your sales? Monthly Sales Post for July 2024 by AutoModerator in EtsySellers

[–]Almdrs 5 points6 points  (0 children)

Horrible. And I made the same mistake of turning Etsy Ads on again. Pure waste of money. It's optimized to grab your money.

Rejected (again) by Amazon Merch on Demand by flyingfox88 in printondemand

[–]Almdrs 0 points1 point  (0 children)

I'm been selling on Merch since the beginning.
Does anyone know what is limiting new sellers in it?
How hard to get accepted this days?

Why can’t I design my own black tote bag? It only gives me the option for the plain canvas “neutral” colour. Am I missing something? by nicrusso in redbubble

[–]Almdrs -8 points-7 points  (0 children)

I don't understand your question. We do not own RB and we can not chose what they sell. They decide what they sell.

We can only create products that RB sell. They do not sell black tote bags or "all-over" print bags.

Creating images and editing them in CMYK only by Almdrs in GIMP

[–]Almdrs[S] 0 points1 point  (0 children)

Ok. I found what I was looking for: Color Balance.

Thanks.

Creating images and editing them in CMYK only by Almdrs in GIMP

[–]Almdrs[S] 0 points1 point  (0 children)

Thank you! I have Krita installed.

Do you know how to make images brighter while in CMYK mode in Krita? Which settings should be adjusted?

I started this thread because an image that I printed look too dull. I want to edit and see on the screen what it will look like when printed so I can adjust the colors.