Results 1 to 5 of 5

Thread: Need help for Main Source of Logic Design in Visual Logic software

  1. #1
    Join Date
    Jul 2006
    Posts
    128

    Need help for Main Source of Logic Design in Visual Logic software

    I need a help from you guys for solving my problem. I am using the VisualLogic for doing the Programming Design and Logic course. Later on I will be using the VB.NET instead of VisualLogic. The problem that I am facing is described as follows : ""Write a program that reads in a list of positive intergers from the user until the user enters the value -1 as a sentinel. At that time, the program should display the largest value in the input list"". I don't know how to make the program recognize the largest number entered? Please help me soon.!!
    "Every man is guilty of all the good he did not do". - Voltaire

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Need help for Main Source of Logic Design in Visual Logic software

    You should able to compare the number to a temporary maximum entered value variable or store when the user enters a positive integer. It should called from the temporary variable if the user enters -1 as maximum number. I have created this rough code for you..

    int Max_Num = 0
    While (num entered != -1)
    if num entered > Max_Num
    store num entered in Max_Num
    end while
    Display Max_Num

    In this coding the when Max_Num is greater than the previous maximum number than only it will get updated. And if the newly entered number is less than current value in Max_Num, it will skip that number.

  3. #3
    Join Date
    Nov 2005
    Posts
    1,323

    Re: Need help for Main Source of Logic Design in Visual Logic software

    I think that using VisualLogic software is more complicated when compared to the Visual Basic. I know some features of the variable in the VisualLogic software. Any variable, is global when you declare in the Information Store. This can be read and written to by any Visual Logic section. A local variable that it is declared in only exists within the Visual Logic section. The variable is cleared and its values lost once that block ends. The variable can be declared elsewhere and will be treated as a different variable of the same name. If the Visual Logic section is entered again before it's exited each call of the Visual Logic section will have a distinct local variable, then a local variable can even exist multiple times simultaneously.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Need help for Main Source of Logic Design in Visual Logic software

    Even I think that developing the code in Visual Basic is more easier than the VisualLogic. The following is the code for the same program that you have mentioned but it is in Visual Basic 6.0 :

    Dim intInput As Integer
    Dim intMax As Integer

    Public Sub Main()
    'use do..loop statement
    Do
    intInput = InputBox("Enter your value")

    If intInput > intMax Then
    intMax = intInput
    End If
    Loop Until intInput = -1

    'print the largest number
    Print intMax
    End Sub

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Need help for Main Source of Logic Design in Visual Logic software

    The code provided by the 'kelfro' for the VB 6.0, seems to be correct. I have not used it but seeing the logic I can make that it is right. Even I am confused that why you are using the Visual Logic Programming?? The Visual Basic is much better than the VLP. Also I don't know the coding in VPL so apologies for that.! I hope that you will feel good if you use the VB.

Similar Threads

  1. Beat Pad for Logic Pro 9?
    By $Iain$ in forum Windows Software
    Replies: 2
    Last Post: 17-02-2012, 06:01 PM
  2. How to do DLL injection logic
    By Thenral in forum Software Development
    Replies: 5
    Last Post: 27-06-2011, 10:30 AM
  3. Replacement for Volume Logic
    By Nadiaa in forum Operating Systems
    Replies: 7
    Last Post: 20-03-2011, 06:01 PM
  4. Logic Pro 9 64 Bit for Snow Leopard
    By Daniel23 in forum Windows Software
    Replies: 5
    Last Post: 16-01-2010, 02:54 AM
  5. Need help with PHP script logic
    By garfield1 in forum Software Development
    Replies: 3
    Last Post: 27-11-2009, 02:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,483,214.45349 seconds with 17 queries