| Off Topic > Off Topic |
| Programming Megathread |
| << < (80/241) > >> |
| ZSNO:
--- Quote from: Foxscotch on January 26, 2016, 05:22:44 PM ---I mean like this --- End quote --- You can change the size of the command prompt window Keep the invalid reasons coming bb |
| Foxscotch:
--- Quote from: ZSNO on January 26, 2016, 06:17:25 PM ---You can change the size of the command prompt window --- End quote --- yes, I know. do you know what default means? because I do, that's why I said it |
| ZSNO:
--- Quote from: Foxscotch on January 26, 2016, 06:22:19 PM ---yes, I know. do you know what default means? because I do, that's why I said it --- End quote --- Oh, you didn't realize that I'm responding to your terrible reasoning with a little less terrible reasons? There's no valid reason to keep an 80 character limit. |
| Headcrab Zombie:
--- Quote from: Maxwell. on January 26, 2016, 06:12:45 PM ---well the code doesn't need any global variables, I'm just trying to get it so it uses local variables only because it's seen as bad practise idk --- End quote --- They're not technically global, they're members of the class "Form1" Just pass variableB as the second argument to Generate(A, B)? Also returning B doesn't accomplish anything useful if it's ByRef |
| Maxwell.:
--- Quote from: Headcrab Zombie on January 26, 2016, 06:51:45 PM ---They're not technically global, they're members of the class "Form1" Just pass variableB as the second argument to Generate(A, B)? Also returning B doesn't accomplish anything useful if it's ByRef --- End quote --- yeah IK, I've fixed it up now --- Code: ---Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim variableA As String = InputBox("Enter a name") Dim variableGA As String variableGA = Generate(variableA) lblName.Text = variableGA End Sub Function Generate(ByVal variableA As String) Return Len(variableA) & UCase(variableA) End Function End Class --- End code --- |
| Navigation |
| Message Index |
| Next page |
| Previous page |